Skip to content

Conversation

@GuillaumeLagrange
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange commented Aug 24, 2025

https://github.com/CodSpeedHQ/codspeed-node/pull/51/files#diff-37f58390c47ed415f315435a8b448d14d00f4fb914e205d86410d694c3215d94R28-R38

Explains the 4 added walltime benches (fixes a bug where only last bench result of a bid was written to json)

@GuillaumeLagrange GuillaumeLagrange marked this pull request as ready for review August 24, 2025 18:49
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from e18965c to 2a7d48a Compare August 24, 2025 18:56
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 24, 2025

CodSpeed Instrumentation Performance Report

Merging #51 will degrade performances by 84.69%

Comparing cod-1221-support-perf-profiling-with-codspeed-node (e31ee8b) with main (81f0dc9)

Summary

⚡ 7 improvements
❌ 11 regressions
✅ 64 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
switch 1 30 µs 123.9 µs -75.76%
test_iterative_fibo_10 450.4 µs 299.4 µs +50.4%
test_iterative_fibo_100 194.6 µs 34 µs ×5.7
test_recursive_cached_fibo_30 205.7 µs 48.9 µs ×4.2
test_recursive_fibo_10 46 µs 138.4 µs -66.81%
test sync baz 10 201.3 µs 40.9 µs ×4.9
test_recursive_fibo_20 1.5 ms 1.8 ms -15.84%
test_iterative_fibo_10 29.1 µs 190.3 µs -84.69%
test_iterative_fibo_100 282.3 µs 214.2 µs +31.76%
test_recursive_cached_fibo_30 47.2 µs 227.5 µs -79.25%
test_recursive_fibo_10 46 µs 139 µs -66.92%
test sync baz 10 39.4 µs 200 µs -80.31%
switch 1 30.7 µs 125.2 µs -75.47%
switch 1 30.7 µs 123.7 µs -75.2%
short body 102.5 µs 121.1 µs -15.37%
switch 1 30.9 µs 93.3 µs -66.94%
switch 2 25.5 µs 8.1 µs ×3.2
wait 1ms 24.7 µs 19.8 µs +24.92%

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 24, 2025

CodSpeed WallTime Performance Report

Merging #51 will degrade performances by 50%

Comparing cod-1221-support-perf-profiling-with-codspeed-node (e31ee8b) with main (81f0dc9)

Summary

❌ 18 regressions
✅ 26 untouched
🆕 4 new

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
switch 1 156 ns 300 ns -48%
switch 2 156 ns 300 ns -48%
test_iterative_fibo_10 216 ns 372 ns -41.94%
test_iterative_fibo_100 504 ns 648 ns -22.22%
test_recursive_cached_fibo_10 984 ns 1,164 ns -15.46%
test_recursive_cached_fibo_30 3.1 µs 3.5 µs -11.11%
test sync baz 10 156 ns 300 ns -48%
test sync baz 100 288 ns 432 ns -33.33%
test_iterative_fibo_10 228 ns 396 ns -42.42%
test_iterative_fibo_100 504 ns 672 ns -25%
test_recursive_cached_fibo_10 996 ns 1,164 ns -14.43%
test sync baz 10 168 ns 312 ns -46.15%
test sync baz 100 288 ns 432 ns -33.33%
switch 1 144 ns 276 ns -47.83%
switch 2 156 ns 312 ns -50%
switch 1 156 ns 264 ns -40.91%
switch 2 168 ns 300 ns -44%
🆕 long body N/A 217.6 µs N/A
🆕 short body N/A 1.8 µs N/A
🆕 switch 1 N/A 144 ns N/A
... ... ... ... ...

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

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 2a7d48a to 012d605 Compare August 31, 2025 17:26
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch 12 times, most recently from b4b71ef to 5ef7f44 Compare September 14, 2025 16:11
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 5ef7f44 to 079d5f2 Compare September 15, 2025 09:23
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 079d5f2 to f070d03 Compare September 15, 2025 09:45
Copy link
Member

@adriencaccia adriencaccia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there 💪

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 69ecc14 to 0703b06 Compare September 15, 2025 13:14
Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need that much duplication between instrumented.ts and walltime.ts? Since we already have unavoidable duplication between sync and async, it gets a bit hard to verify the logic

@GuillaumeLagrange GuillaumeLagrange changed the title Allow perf profiling in tinybench plugin Add perf profiling to tinybench Sep 16, 2025
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch 2 times, most recently from e55aee6 to 29f65e9 Compare September 17, 2025 09:22
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 29f65e9 to d9c546a Compare September 17, 2025 09:30
@GuillaumeLagrange
Copy link
Contributor Author

Do we need that much duplication between instrumented.ts and walltime.ts? Since we already have unavoidable duplication between sync and async, it gets a bit hard to verify the logic

I've adressed this in d9c546a

This commit also removes the setupCore issue you pointed out

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from d9c546a to 91a7670 Compare September 18, 2025 14:43
@GuillaumeLagrange
Copy link
Contributor Author

@art049 the x1000 in instrumented runs are fixed. We were actually measuring the garbage collector call because of a refactoring error. Changes look more in line with what's expected now

This is not used yet, but keeping the implementation just in case. If
untouched for a long time, do not hesitate to remove
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch from 91a7670 to 92756b8 Compare September 19, 2025 12:14
@GuillaumeLagrange GuillaumeLagrange changed the base branch from main to rebump-action-to-v4 September 19, 2025 12:15
Base automatically changed from rebump-action-to-v4 to main September 19, 2025 13:58
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch 2 times, most recently from f052c13 to 9575172 Compare September 19, 2025 14:04
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1221-support-perf-profiling-with-codspeed-node branch 5 times, most recently from 7ee6021 to e31ee8b Compare September 26, 2025 07:06
Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally Titanic Ship

@GuillaumeLagrange GuillaumeLagrange merged commit e31ee8b into main Sep 26, 2025
28 of 29 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-1221-support-perf-profiling-with-codspeed-node branch September 26, 2025 09:41
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.

4 participants