Skip to content

Commit adbe6ae

Browse files
authored
Merge pull request #57 from intersystems/fix-mapping-sql-performance
feat: improve SQL performance of MapRunCoverage
2 parents 181e2bb + 2e97e33 commit adbe6ae

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

+5
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.5] - 2024-11-04
9+
10+
### Fixed
11+
- #57: Improve SQL performance when mapping run coverage
12+
813
## [4.0.4] - 2024-10-15
914

1015
### Fixed

cls/TestCoverage/Data/Run.cls

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ ClassMethod MapRunCoverage(pRunIndex As %Integer) As %Status
128128
Set tSQLStatement = "INSERT OR UPDATE %NOLOCK %NOCHECK INTO TestCoverage_Data.Coverage_"_tMetric_" "_
129129
"(Coverage,element_key,"_tMetric_") "_
130130
"SELECT target.ID,map.ToLine,NVL(oldMetric."_tMetric_",0) + SUM(metric."_tMetric_") "_
131-
"FROM TestCoverage_Data.Coverage source "_
132-
"JOIN TestCoverage_Data.CodeUnitMap map "_
133-
" ON source.Hash = map.FromHash "_
131+
"FROM %INORDER TestCoverage_Data.Coverage source "_
134132
"JOIN TestCoverage_Data.Coverage_"_tMetric_" metric "_
135133
" ON metric.Coverage = source.ID "_
134+
"JOIN TestCoverage_Data.CodeUnitMap map "_
135+
" ON source.Hash = map.FromHash "_
136136
" AND metric.element_key = map.FromLine "_
137137
"JOIN TestCoverage_Data.Coverage target "_
138138
" ON target.Run = source.Run "_

module.xml

+1-1
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.4</Version>
5+
<Version>4.0.5</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)