Skip to content

Commit c4ddca2

Browse files
authored
Merge pull request #71 from intersystems/cherrypick-table-stats-fix
fix: missing table stats make performance awful?
2 parents 9ae38c6 + d003cdd commit c4ddca2

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

CHANGELOG.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.0.8] - Unreleased
9+
10+
### Fixed
11+
- #70: Performance regression on newer IRIS versions when table stats are missing on a clean instance/run
12+
813
## [4.0.7] - 2025-09-23
914

1015
### Fixed
@@ -18,48 +23,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1823

1924
## [4.0.5] - 2024-11-04
2025

21-
### Fixed
26+
### Fixed
2227
- #57: Improve SQL performance when mapping run coverage
2328

2429
## [4.0.4] - 2024-10-15
2530

26-
### Fixed
31+
### Fixed
2732
- #54: Defend against possible configuration-dependent SQL exceptions in mapping INT to MAC/CLS coverage
2833

2934
## [4.0.3] - 2024-08-19
3035

31-
### Fixed
32-
- #52: Method mapping code now doesn't use AST's endline_no property to support older python versions
36+
### Fixed
37+
- #52: Method mapping code now doesn't use AST's endline_no property to support older python versions
3338
- #53: Ignore traced commands from code without a class name
3439

3540
## [4.0.2] - 2024-08-16
3641

3742
### Fixed
38-
- #51: Don't start (and stop) the ObjectScript and Python monitors if there are no ObjectScript/Python routines being tracked respectively, fixes error from trying to start/stop the %Monitor.System.LineByLine with no routines
43+
- #51: Don't start (and stop) the ObjectScript and Python monitors if there are no ObjectScript/Python routines being tracked respectively, fixes error from trying to start/stop the %Monitor.System.LineByLine with no routines
3944

4045

4146
## [4.0.1] - 2024-08-16
4247

43-
### Fixed
44-
- #45: Fixed Python line 0 tracking for 2024.2
48+
### Fixed
49+
- #45: Fixed Python line 0 tracking for 2024.2
4550
- #46: Fix for bug caused by UpdateComplexity calling GetCurrentByName unnecessarily and causing dependency issues
4651
- #47: Fixed mapping issue caused by empty lines at top of Python method not showing up in compiled Python
47-
- #48: When the Line-By-Line Monitor resumes after pausing, resume the Python tracer too
52+
- #48: When the Line-By-Line Monitor resumes after pausing, resume the Python tracer too
4853
- #49: Added user parameter for preloading python modules (fixes problem of pandas breaking sys.settrace on first import)
4954

5055
## [4.0.0] - 2024-08-01
5156

5257
### Changed
5358
- #29: As a consequence of this change, the minimum supported platform version is 2022.1
5459

55-
### Added
60+
### Added
5661
- #29: Track code coverage for embedded python methods in .cls files
57-
- #42: Added a listener interface and manager with an associated user parameter, allowing the user to broadcast output on test method/case/suite completion.
62+
- #42: Added a listener interface and manager with an associated user parameter, allowing the user to broadcast output on test method/case/suite completion.
5863

5964
## [3.1.1] - 2024-07-31
6065

6166
### Fixed
62-
- #39: Fixed bug where results viewer gave divide by zero error when there were 0 executed methods in the covered code
67+
- #39: Fixed bug where results viewer gave divide by zero error when there were 0 executed methods in the covered code
6368
- #41: Now the code strips leading and trailing whitespace from coverage.list, so "PackageName.PKG " will still be loaded properly
6469

6570
## [3.1.0] - 2024-07-05

cls/TestCoverage/Data/Run.cls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ ClassMethod MapRunCoverage(pRunIndex As %Integer) As %Status
3535
Try {
3636
Set tRun = ##class(TestCoverage.Data.Run).%OpenId(pRunIndex,,.tSC)
3737
$$$ThrowOnError(tSC)
38+
39+
do $SYSTEM.SQL.Stats.Table.GatherSchemaStats("TestCoverage_Data","TuneLog.txt")
40+
do $SYSTEM.SQL.Stats.Table.GatherSchemaStats("TestCoverage_Data_Aggregate","TuneLog.txt")
41+
do $SYSTEM.SQL.Stats.Table.GatherSchemaStats("TestCoverage_Data_CodeSubUnit","TuneLog.txt")
3842

3943
// It would be wonderful if there was support for something along the lines of (with a few made up non-functions):
4044
/*
@@ -117,6 +121,8 @@ ClassMethod MapRunCoverage(pRunIndex As %Integer) As %Status
117121
Set tCoverage.CoveredLines = $BitLogic(tCoverage.CoveredLines|hCoveredLines)
118122
$$$ThrowOnError(tCoverage.%Save())
119123
}
124+
125+
do $SYSTEM.SQL.Stats.Table.GatherTableStats("TestCoverage_Data.Coverage","TuneLog.txt")
120126

121127
// Copy any other metrics captured/requested as well.
122128
For i=1:1:tRun.Metrics.Count() {

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Export generator="Cache" version="25">
33
<Document name="TestCoverage.ZPM"><Module>
44
<Name>TestCoverage</Name>
5-
<Version>4.0.7</Version>
5+
<Version>4.0.8</Version>
66
<Description>Run your typical ObjectScript %UnitTest tests and see which lines of your code are executed. Includes Cobertura-style reporting for use in continuous integration tools.</Description>
77
<Packaging>module</Packaging>
88
<Resource Name="TestCoverage.PKG" Directory="cls" />

0 commit comments

Comments
 (0)