-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(godeltaprof): fix mutex tests on gotip (#108)
Fixes #103 This PR fixes an issue when a heap/mutex profile has a record with equal stack (by accumulating values for duplicate stacks before delta computation). The issue was found in tests for mutex(golang started to produce two profile records for the same mutex ( see the linked issue for more info)) I'm not sure if it is possible to trigger the issue for heap. The PR turned up big because of refactored test helpers for reuse. I can split PR into 2 or 3 smaller ones if needed. This PR also drops support for go16, go17 as I wanted to use generics in prof/map.go goos: darwin goarch: arm64 pkg: github.com/grafana/pyroscope-go/godeltaprof/compat │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ HeapCompression-8 691.1µ ± 0% 729.8µ ± 65% +5.59% (p=0.002 n=6) MutexCompression/ScalerMutexProfile-8 640.6µ ± 1% 693.8µ ± 9% +8.30% (p=0.002 n=6) MutexCompression/ScalerBlockProfile-8 643.2µ ± 1% 690.3µ ± 1% +7.33% (p=0.002 n=6) HeapDelta-8 76.26µ ± 1% 113.92µ ± 2% +49.38% (p=0.002 n=6) MutexDelta/ScalerMutexProfile-8 48.98µ ± 1% 81.11µ ± 2% +65.59% (p=0.002 n=6) MutexDelta/ScalerBlockProfile-8 49.03µ ± 1% 81.14µ ± 1% +65.49% (p=0.002 n=6) geomean 193.3µ 253.0µ +30.87% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ HeapCompression-8 974.1Ki ± 0% 973.9Ki ± 0% -0.03% (p=0.002 n=6) MutexCompression/ScalerMutexProfile-8 974.6Ki ± 0% 974.3Ki ± 0% -0.02% (p=0.002 n=6) MutexCompression/ScalerBlockProfile-8 974.6Ki ± 0% 974.3Ki ± 0% -0.03% (p=0.002 n=6) HeapDelta-8 333.00 ± 0% 53.00 ± 0% -84.08% (p=0.002 n=6) MutexDelta/ScalerMutexProfile-8 312.00 ± 0% 30.00 ± 0% -90.38% (p=0.002 n=6) MutexDelta/ScalerBlockProfile-8 312.00 ± 0% 30.00 ± 0% -90.38% (p=0.002 n=6) geomean 17.42Ki 5.874Ki -66.28% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ HeapCompression-8 788.0 ± 0% 787.0 ± 0% -0.13% (p=0.002 n=6) MutexCompression/ScalerMutexProfile-8 788.0 ± 0% 787.0 ± 0% -0.13% (p=0.002 n=6) MutexCompression/ScalerBlockProfile-8 788.0 ± 0% 787.0 ± 0% -0.13% (p=0.002 n=6) HeapDelta-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.002 n=6) MutexDelta/ScalerMutexProfile-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.002 n=6) MutexDelta/ScalerBlockProfile-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.002 n=6) geomean 39.70 28.05 -29.33% So it looks like the cost of deduplication is about 5% of overall time(including compression), which is not that bad.
- Loading branch information
1 parent
07e7716
commit 181f95a
Showing
18 changed files
with
554 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= | ||
github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= | ||
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= | ||
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.