Skip to content

Use proper pid in google benchmark walltime, expose CODSPEED_MODE as en option, fix compilation error with -Wall in instrumented mode#6

Merged
GuillaumeLagrange merged 6 commits into
mainfrom
fix-walltime-pid
Mar 17, 2025
Merged

Use proper pid in google benchmark walltime, expose CODSPEED_MODE as en option, fix compilation error with -Wall in instrumented mode#6
GuillaumeLagrange merged 6 commits into
mainfrom
fix-walltime-pid

Conversation

@GuillaumeLagrange

@GuillaumeLagrange GuillaumeLagrange commented Mar 14, 2025

Copy link
Copy Markdown
Contributor

Performance improvement is expected as the example is now compiled using CMAKE_BUILD_TYPE RelWithDebInfo

@codspeed-hq

codspeed-hq Bot commented Mar 14, 2025

Copy link
Copy Markdown

CodSpeed Instrumentation Performance Report

Merging #6 will improve performances by 72.05%

Comparing fix-walltime-pid (dc3c61d) with main (772a2db)

Summary

⚡ 21 improvements

Benchmarks breakdown

Benchmark BASE HEAD Change
BarTest[MyFixture] 6.2 µs 3.6 µs +74.91%
DoubleTest[MyTemplatedFixture, double] 6.3 µs 3.5 µs +80.92%
FooTest[MyFixture] 6.3 µs 3.6 µs +75.73%
IntTest[MyTemplatedFixture, int] 6.3 µs 3.5 µs +79.43%
TestA[MyTemplate1, int] 6.3 µs 3.5 µs +80.92%
TestB[MyTemplate2, int, double] 6.3 µs 3.5 µs +81.6%
BM_Capture[int_string_test] 8.5 µs 3.8 µs ×2.3
BM_Capture[int_test] 7 µs 3.6 µs +94.48%
BM_StringCopy 7.9 µs 3.9 µs ×2
BM_memcpy[4096] 15.2 µs 3.6 µs ×4.3
BM_memcpy[512] 8.4 µs 3.6 µs ×2.3
BM_memcpy[64] 7.6 µs 3.6 µs ×2.1
BM_memcpy[8192] 21.4 µs 3.6 µs ×6
BM_memcpy[8] 7.6 µs 3.6 µs ×2.1
BM_rand_vector 7 µs 3.6 µs +92.62%
BM_Template1[int] 6.2 µs 3.6 µs +73.22%
BM_Template1_Capture[int_string_test] 8.4 µs 3.7 µs ×2.3
BM_Template1_Capture[two_type_test, int, double] 8.5 µs 3.7 µs ×2.3
BM_Template2[int, double] 6.3 µs 3.7 µs +72.05%
BM_Template[int] 9 µs 4.3 µs ×2.1
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@codspeed-hq

codspeed-hq Bot commented Mar 14, 2025

Copy link
Copy Markdown

CodSpeed Walltime Performance Report

Merging #6 will improve performances by ×11,000,000,000

Comparing fix-walltime-pid (dc3c61d) with main (772a2db)

Summary

⚡ 19 improvements
✅ 2 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
BarTest[MyFixture] 3.9 ns 0 ns ×3,200,000,000
DoubleTest[MyTemplatedFixture, double] 3.9 ns 0 ns ×3,300,000,000
FooTest[MyFixture] 3.8 ns 0 ns ×3,200,000,000
IntTest[MyTemplatedFixture, int] 3.7 ns 0 ns ×3,100,000,000
TestA[MyTemplate1, int] 3.7 ns 0 ns ×3,100,000,000
TestB[MyTemplate2, int, double] 3.9 ns 0 ns ×3,200,000,000
BM_Capture[int_string_test] 3.8 ns 0 ns ×3,000,000,000
BM_Capture[int_test] 3.8 ns 0 ns ×3,100,000,000
BM_StringCopy 42.6 ns 10 ns ×4.3
BM_memcpy[512] 44.8 ns 30 ns +49.28%
BM_memcpy[64] 17.6 ns 6.1 ns ×2.9
BM_memcpy[8] 16.5 ns 6.1 ns ×2.7
BM_rand_vector 13.4 ns 0 ns ×11,000,000,000
BM_Template1[int] 4.5 ns 0.9 ns ×5.2
BM_Template1_Capture[int_string_test] 3.8 ns 0 ns ×3,100,000,000
BM_Template1_Capture[two_type_test, int, double] 3.8 ns 0 ns ×3,200,000,000
BM_Template2[int, double] 5.6 ns 0.9 ns ×6.5
BM_Template[int] 61.2 ns 9.7 ns ×6.3
BM_Template[std\:\:string] 227.3 ns 69.1 ns ×3.3

@GuillaumeLagrange
GuillaumeLagrange force-pushed the fix-walltime-pid branch 3 times, most recently from f061441 to b149832 Compare March 14, 2025 15:41
@GuillaumeLagrange GuillaumeLagrange changed the title fix(google_benchmark): get pid instead of thread id Use proper pid in google benchmark walltime, expose CODSPEED_MODE as en option, fix compilation error with -Wall in instrumented mode Mar 14, 2025
@GuillaumeLagrange
GuillaumeLagrange force-pushed the fix-walltime-pid branch 3 times, most recently from 390f7e5 to 6ee3d20 Compare March 17, 2025 10:31
@GuillaumeLagrange
GuillaumeLagrange merged commit dc3c61d into main Mar 17, 2025
@GuillaumeLagrange
GuillaumeLagrange deleted the fix-walltime-pid branch March 17, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants