Skip to content

Commit 527e4d9

Browse files
authored
Add warmups everywhere applicable (#2531)
1 parent b4daa1f commit 527e4d9

13 files changed

+41
-1
lines changed

tests/Benchmarks/API/ContextPropagationBench.php

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ContextPropagationBench
3636
* @OutputTimeUnit("microseconds")
3737
* @RetryThreshold(10.0)
3838
* @BeforeMethods("resetContext")
39+
* @Warmup(1)
3940
*/
4041
public function benchExtractTraceContext128Bit()
4142
{
@@ -48,6 +49,7 @@ public function benchExtractTraceContext128Bit()
4849
* @OutputTimeUnit("microseconds")
4950
* @RetryThreshold(10.0)
5051
* @BeforeMethods("resetContext")
52+
* @Warmup(1)
5153
*/
5254
public function benchExtractTraceContext64Bit()
5355
{
@@ -60,6 +62,7 @@ public function benchExtractTraceContext64Bit()
6062
* @OutputTimeUnit("microseconds")
6163
* @RetryThreshold(10.0)
6264
* @BeforeMethods("resetContext")
65+
* @Warmup(1)
6366
*/
6467
public function benchExtractHeaders128Bit()
6568
{
@@ -72,6 +75,7 @@ public function benchExtractHeaders128Bit()
7275
* @OutputTimeUnit("microseconds")
7376
* @RetryThreshold(10.0)
7477
* @BeforeMethods("resetContext")
78+
* @Warmup(1)
7579
*/
7680
public function benchExtractHeaders64Bit()
7781
{
@@ -84,6 +88,7 @@ public function benchExtractHeaders64Bit()
8488
* @OutputTimeUnit("microseconds")
8589
* @RetryThreshold(10.0)
8690
* @BeforeMethods("setUp128BitContext")
91+
* @Warmup(1)
8792
*/
8893
public function benchInject128Bit()
8994
{
@@ -96,6 +101,7 @@ public function benchInject128Bit()
96101
* @OutputTimeUnit("microseconds")
97102
* @RetryThreshold(10.0)
98103
* @BeforeMethods("setUp64BitContext")
104+
* @Warmup(1)
99105
*/
100106
public function benchInject64Bit()
101107
{

tests/Benchmarks/API/HookBench.php

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class HookBench
1111
* @Iterations(10)
1212
* @OutputTimeUnit("microseconds")
1313
* @RetryThreshold(10.0)
14+
* @Warmup(1)
1415
*/
1516
public function benchWithoutHook()
1617
{
@@ -25,6 +26,7 @@ public function benchWithoutHook()
2526
* @Iterations(10)
2627
* @OutputTimeUnit("microseconds")
2728
* @RetryThreshold(10.0)
29+
* @Warmup(1)
2830
*/
2931
public function benchHookOverheadTraceMethod()
3032
{
@@ -39,6 +41,7 @@ public function benchHookOverheadTraceMethod()
3941
* @Iterations(10)
4042
* @OutputTimeUnit("microseconds")
4143
* @RetryThreshold(10.0)
44+
* @Warmup(1)
4245
*/
4346
public function benchHookOverheadTraceFunction()
4447
{
@@ -53,6 +56,7 @@ public function benchHookOverheadTraceFunction()
5356
* @Iterations(10)
5457
* @OutputTimeUnit("microseconds")
5558
* @RetryThreshold(10.0)
59+
* @Warmup(1)
5660
*/
5761
public function benchHookOverheadInstallHookOnMethod()
5862
{
@@ -67,6 +71,7 @@ public function benchHookOverheadInstallHookOnMethod()
6771
* @Iterations(10)
6872
* @OutputTimeUnit("microseconds")
6973
* @RetryThreshold(10.0)
74+
* @Warmup(1)
7075
*/
7176
public function benchHookOverheadInstallHookOnFunction()
7277
{

tests/Benchmarks/API/MessagePackSerializationBench.php

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class MessagePackSerializationBench
1212
* @OutputTimeUnit("microseconds")
1313
* @RetryThreshold(10.0)
1414
* @ParamProviders({"provideTraceArrays"})
15+
* @Warmup(1)
1516
*/
1617
public function benchMessagePackSerialization($traceArray)
1718
{

tests/Benchmarks/API/SamplingRuleMatchingBench.php

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class SamplingRuleMatchingBench
1111
* @Iterations(10)
1212
* @OutputTimeUnit("microseconds")
1313
* @RetryThreshold(10.0)
14+
* @Warmup(1)
1415
*/
1516
public function benchGlobMatching1(): void
1617
{
@@ -22,6 +23,7 @@ public function benchGlobMatching1(): void
2223
* @Iterations(10)
2324
* @OutputTimeUnit("microseconds")
2425
* @RetryThreshold(10.0)
26+
* @Warmup(1)
2527
*/
2628
public function benchGlobMatching2(): void
2729
{
@@ -33,6 +35,7 @@ public function benchGlobMatching2(): void
3335
* @Iterations(10)
3436
* @OutputTimeUnit("microseconds")
3537
* @RetryThreshold(10.0)
38+
* @Warmup(1)
3639
*/
3740
public function benchGlobMatching3(): void
3841
{
@@ -44,6 +47,7 @@ public function benchGlobMatching3(): void
4447
* @Iterations(10)
4548
* @OutputTimeUnit("microseconds")
4649
* @RetryThreshold(10.0)
50+
* @Warmup(1)
4751
*/
4852
public function benchGlobMatching4(): void
4953
{
@@ -55,6 +59,7 @@ public function benchGlobMatching4(): void
5559
* @Iterations(10)
5660
* @OutputTimeUnit("microseconds")
5761
* @RetryThreshold(10.0)
62+
* @Warmup(1)
5863
*/
5964
public function benchRegexMatching1(): void
6065
{
@@ -66,6 +71,7 @@ public function benchRegexMatching1(): void
6671
* @Iterations(10)
6772
* @OutputTimeUnit("microseconds")
6873
* @RetryThreshold(10.0)
74+
* @Warmup(1)
6975
*/
7076
public function benchRegexMatching2(): void
7177
{
@@ -77,6 +83,7 @@ public function benchRegexMatching2(): void
7783
* @Iterations(10)
7884
* @OutputTimeUnit("microseconds")
7985
* @RetryThreshold(10.0)
86+
* @Warmup(1)
8087
*/
8188
public function benchRegexMatching3(): void
8289
{
@@ -88,6 +95,7 @@ public function benchRegexMatching3(): void
8895
* @Iterations(10)
8996
* @OutputTimeUnit("microseconds")
9097
* @RetryThreshold(10.0)
98+
* @Warmup(1)
9199
*/
92100
public function benchRegexMatching4(): void
93101
{

tests/Benchmarks/API/SpanBench.php

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class SpanBench
1616
* @Iterations(10)
1717
* @OutputTimeUnit("microseconds")
1818
* @RetryThreshold(10.0)
19+
* @Warmup(1)
1920
*/
2021
public function benchDatadogAPI()
2122
{
@@ -44,6 +45,7 @@ public function benchDatadogAPI()
4445
* @OutputTimeUnit("microseconds")
4546
* @RetryThreshold(10.0)
4647
* @BeforeMethods("setUpOpenTelemetry")
48+
* @Warmup(1)
4749
*/
4850
public function benchOpenTelemetryAPI()
4951
{
@@ -72,6 +74,7 @@ public function benchOpenTelemetryAPI()
7274
* @OutputTimeUnit("microseconds")
7375
* @RetryThreshold(10.0)
7476
* @BeforeMethods("setUpOpenTelemetry")
77+
* @Warmup(1)
7578
*/
7679
public function benchOpenTelemetryInteroperability()
7780
{

tests/Benchmarks/API/TraceAnnotationsBench.php

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class TraceAnnotationsBench
1111
* @Iterations(10)
1212
* @OutputTimeUnit("microseconds")
1313
* @RetryThreshold(10.0)
14+
* @Warmup(1)
1415
*/
1516
public function benchTraceAnnotationOverhead()
1617
{

tests/Benchmarks/API/TraceSerializationBench.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class TraceSerializationBench
88
{
99
/**
1010
* @Revs(1)
11-
* @Iterations(10)
11+
* @Iterations(20)
1212
* @OutputTimeUnit("microseconds")
1313
* @RetryThreshold(10.0)
1414
* @BeforeMethods("setUp")

tests/Benchmarks/Integrations/EmptyFileBench.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class EmptyFileBench extends WebFrameworkTestCase
1616
* @Iterations(10)
1717
* @OutputTimeUnit("microseconds")
1818
* @RetryThreshold(10.0)
19+
* @Warmup(1)
1920
*/
2021
public function benchEmptyFileBaseline()
2122
{
@@ -32,6 +33,7 @@ public function benchEmptyFileBaseline()
3233
* @Iterations(10)
3334
* @OutputTimeUnit("microseconds")
3435
* @RetryThreshold(10.0)
36+
* @Warmup(1)
3537
*/
3638
public function benchEmptyFileOverhead()
3739
{

tests/Benchmarks/Integrations/LaravelBench.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class LaravelBench extends WebFrameworkTestCase
1616
* @Iterations(10)
1717
* @OutputTimeUnit("microseconds")
1818
* @RetryThreshold(10.0)
19+
* @Warmup(1)
1920
*/
2021
public function benchLaravelBaseline()
2122
{
@@ -32,6 +33,7 @@ public function benchLaravelBaseline()
3233
* @Iterations(10)
3334
* @OutputTimeUnit("microseconds")
3435
* @RetryThreshold(10.0)
36+
* @Warmup(1)
3537
*/
3638
public function benchLaravelOverhead()
3739
{

tests/Benchmarks/Integrations/LogsInjectionBench.php

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class LogsInjectionBench
2020
* @Iterations(10)
2121
* @OutputTimeUnit("microseconds")
2222
* @RetryThreshold(10.0)
23+
* @Warmup(1)
2324
*/
2425
public function benchLogsInfoBaseline()
2526
{
@@ -32,6 +33,7 @@ public function benchLogsInfoBaseline()
3233
* @Iterations(10)
3334
* @OutputTimeUnit("microseconds")
3435
* @RetryThreshold(10.0)
36+
* @Warmup(1)
3537
*/
3638
public function benchLogsInfoInjection()
3739
{
@@ -44,6 +46,7 @@ public function benchLogsInfoInjection()
4446
* @Iterations(10)
4547
* @OutputTimeUnit("microseconds")
4648
* @RetryThreshold(10.0)
49+
* @Warmup(1)
4750
*/
4851
public function benchLogsNullBaseline()
4952
{
@@ -58,6 +61,7 @@ public function benchLogsNullBaseline()
5861
* @Iterations(10)
5962
* @OutputTimeUnit("microseconds")
6063
* @RetryThreshold(10.0)
64+
* @Warmup(1)
6165
*/
6266
public function benchLogsNullInjection()
6367
{

tests/Benchmarks/Integrations/PDOBench.php

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class PDOBench
2525
* @Iterations(15)
2626
* @OutputTimeUnit("microseconds")
2727
* @RetryThreshold(10.0)
28+
* @Warmup(1)
2829
*/
2930
public function benchPDOBaseline()
3031
{
@@ -37,6 +38,7 @@ public function benchPDOBaseline()
3738
* @Iterations(15)
3839
* @OutputTimeUnit("microseconds")
3940
* @RetryThreshold(10.0)
41+
* @Warmup(1)
4042
*/
4143
public function benchPDOOverhead()
4244
{
@@ -49,6 +51,7 @@ public function benchPDOOverhead()
4951
* @Iterations(15)
5052
* @OutputTimeUnit("microseconds")
5153
* @RetryThreshold(10.0)
54+
* @Warmup(1)
5255
*/
5356
public function benchPDOOverheadWithDBM()
5457
{

tests/Benchmarks/Integrations/SymfonyBench.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class SymfonyBench extends WebFrameworkTestCase
1616
* @Iterations(10)
1717
* @OutputTimeUnit("microseconds")
1818
* @RetryThreshold(10.0)
19+
* @Warmup(1)
1920
*/
2021
public function benchSymfonyBaseline()
2122
{
@@ -32,6 +33,7 @@ public function benchSymfonyBaseline()
3233
* @Iterations(10)
3334
* @OutputTimeUnit("microseconds")
3435
* @RetryThreshold(10.0)
36+
* @Warmup(1)
3537
*/
3638
public function benchSymfonyOverhead()
3739
{

tests/Benchmarks/Integrations/WordPressBench.php

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class WordPressBench extends WebFrameworkTestCase
1616
* @Iterations(10)
1717
* @OutputTimeUnit("microseconds")
1818
* @RetryThreshold(10.0)
19+
* @Warmup(1)
1920
*/
2021
public function benchWordPressOverhead()
2122
{
@@ -32,6 +33,7 @@ public function benchWordPressOverhead()
3233
* @Iterations(10)
3334
* @OutputTimeUnit("microseconds")
3435
* @RetryThreshold(10.0)
36+
* @Warmup(1)
3537
*/
3638
public function benchEnhancedWordPressOverhead()
3739
{
@@ -82,6 +84,7 @@ public function enableEnhancedWordPressTracing()
8284
* @Iterations(10)
8385
* @OutputTimeUnit("microseconds")
8486
* @RetryThreshold(10.0)
87+
* @Warmup(1)
8588
*/
8689
public function benchWordPressBaseline()
8790
{

0 commit comments

Comments
 (0)