Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve SQL performance of MapRunCoverage #57

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.5] - 2024-11-04

### Fixed
- #57: Improve SQL performance when mapping run coverage

## [4.0.4] - 2024-10-15

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions cls/TestCoverage/Data/Run.cls
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ ClassMethod MapRunCoverage(pRunIndex As %Integer) As %Status
Set tSQLStatement = "INSERT OR UPDATE %NOLOCK %NOCHECK INTO TestCoverage_Data.Coverage_"_tMetric_" "_
"(Coverage,element_key,"_tMetric_") "_
"SELECT target.ID,map.ToLine,NVL(oldMetric."_tMetric_",0) + SUM(metric."_tMetric_") "_
"FROM TestCoverage_Data.Coverage source "_
"JOIN TestCoverage_Data.CodeUnitMap map "_
" ON source.Hash = map.FromHash "_
"FROM %INORDER TestCoverage_Data.Coverage source "_
"JOIN TestCoverage_Data.Coverage_"_tMetric_" metric "_
" ON metric.Coverage = source.ID "_
"JOIN TestCoverage_Data.CodeUnitMap map "_
" ON source.Hash = map.FromHash "_
" AND metric.element_key = map.FromLine "_
"JOIN TestCoverage_Data.Coverage target "_
" ON target.Run = source.Run "_
Expand Down
2 changes: 1 addition & 1 deletion module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Export generator="Cache" version="25">
<Document name="TestCoverage.ZPM"><Module>
<Name>TestCoverage</Name>
<Version>4.0.4</Version>
<Version>4.0.5</Version>
<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>
<Packaging>module</Packaging>
<Resource Name="TestCoverage.PKG" Directory="cls" />
Expand Down
Loading