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

benchmarks: Use 1 Warmup Interation and ensure opcache is used #2531

Merged
merged 1 commit into from
Feb 23, 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
6 changes: 6 additions & 0 deletions tests/Benchmarks/API/ContextPropagationBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ContextPropagationBench
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("resetContext")
* @Warmup(1)
*/
public function benchExtractTraceContext128Bit()
{
Expand All @@ -48,6 +49,7 @@ public function benchExtractTraceContext128Bit()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("resetContext")
* @Warmup(1)
*/
public function benchExtractTraceContext64Bit()
{
Expand All @@ -60,6 +62,7 @@ public function benchExtractTraceContext64Bit()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("resetContext")
* @Warmup(1)
*/
public function benchExtractHeaders128Bit()
{
Expand All @@ -72,6 +75,7 @@ public function benchExtractHeaders128Bit()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("resetContext")
* @Warmup(1)
*/
public function benchExtractHeaders64Bit()
{
Expand All @@ -84,6 +88,7 @@ public function benchExtractHeaders64Bit()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("setUp128BitContext")
* @Warmup(1)
*/
public function benchInject128Bit()
{
Expand All @@ -96,6 +101,7 @@ public function benchInject128Bit()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("setUp64BitContext")
* @Warmup(1)
*/
public function benchInject64Bit()
{
Expand Down
5 changes: 5 additions & 0 deletions tests/Benchmarks/API/HookBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class HookBench
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchWithoutHook()
{
Expand All @@ -25,6 +26,7 @@ public function benchWithoutHook()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchHookOverheadTraceMethod()
{
Expand All @@ -39,6 +41,7 @@ public function benchHookOverheadTraceMethod()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchHookOverheadTraceFunction()
{
Expand All @@ -53,6 +56,7 @@ public function benchHookOverheadTraceFunction()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchHookOverheadInstallHookOnMethod()
{
Expand All @@ -67,6 +71,7 @@ public function benchHookOverheadInstallHookOnMethod()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchHookOverheadInstallHookOnFunction()
{
Expand Down
1 change: 1 addition & 0 deletions tests/Benchmarks/API/MessagePackSerializationBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class MessagePackSerializationBench
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @ParamProviders({"provideTraceArrays"})
* @Warmup(1)
*/
public function benchMessagePackSerialization($traceArray)
{
Expand Down
8 changes: 8 additions & 0 deletions tests/Benchmarks/API/SamplingRuleMatchingBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class SamplingRuleMatchingBench
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchGlobMatching1(): void
{
Expand All @@ -22,6 +23,7 @@ public function benchGlobMatching1(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchGlobMatching2(): void
{
Expand All @@ -33,6 +35,7 @@ public function benchGlobMatching2(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchGlobMatching3(): void
{
Expand All @@ -44,6 +47,7 @@ public function benchGlobMatching3(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchGlobMatching4(): void
{
Expand All @@ -55,6 +59,7 @@ public function benchGlobMatching4(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchRegexMatching1(): void
{
Expand All @@ -66,6 +71,7 @@ public function benchRegexMatching1(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchRegexMatching2(): void
{
Expand All @@ -77,6 +83,7 @@ public function benchRegexMatching2(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchRegexMatching3(): void
{
Expand All @@ -88,6 +95,7 @@ public function benchRegexMatching3(): void
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchRegexMatching4(): void
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Benchmarks/API/SpanBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class SpanBench
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchDatadogAPI()
{
Expand Down Expand Up @@ -44,6 +45,7 @@ public function benchDatadogAPI()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("setUpOpenTelemetry")
* @Warmup(1)
*/
public function benchOpenTelemetryAPI()
{
Expand Down Expand Up @@ -72,6 +74,7 @@ public function benchOpenTelemetryAPI()
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("setUpOpenTelemetry")
* @Warmup(1)
*/
public function benchOpenTelemetryInteroperability()
{
Expand Down
1 change: 1 addition & 0 deletions tests/Benchmarks/API/TraceAnnotationsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TraceAnnotationsBench
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchTraceAnnotationOverhead()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Benchmarks/API/TraceSerializationBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TraceSerializationBench
{
/**
* @Revs(1)
* @Iterations(10)
* @Iterations(20)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @BeforeMethods("setUp")
Expand Down
2 changes: 2 additions & 0 deletions tests/Benchmarks/Integrations/EmptyFileBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class EmptyFileBench extends WebFrameworkTestCase
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchEmptyFileBaseline()
{
Expand All @@ -32,6 +33,7 @@ public function benchEmptyFileBaseline()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchEmptyFileOverhead()
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Benchmarks/Integrations/LaravelBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class LaravelBench extends WebFrameworkTestCase
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLaravelBaseline()
{
Expand All @@ -32,6 +33,7 @@ public function benchLaravelBaseline()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLaravelOverhead()
{
Expand Down
4 changes: 4 additions & 0 deletions tests/Benchmarks/Integrations/LogsInjectionBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class LogsInjectionBench
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLogsInfoBaseline()
{
Expand All @@ -32,6 +33,7 @@ public function benchLogsInfoBaseline()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLogsInfoInjection()
{
Expand All @@ -44,6 +46,7 @@ public function benchLogsInfoInjection()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLogsNullBaseline()
{
Expand All @@ -58,6 +61,7 @@ public function benchLogsNullBaseline()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchLogsNullInjection()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Benchmarks/Integrations/PDOBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class PDOBench
* @Iterations(15)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchPDOBaseline()
{
Expand All @@ -37,6 +38,7 @@ public function benchPDOBaseline()
* @Iterations(15)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchPDOOverhead()
{
Expand All @@ -49,6 +51,7 @@ public function benchPDOOverhead()
* @Iterations(15)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchPDOOverheadWithDBM()
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Benchmarks/Integrations/SymfonyBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class SymfonyBench extends WebFrameworkTestCase
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchSymfonyBaseline()
{
Expand All @@ -32,6 +33,7 @@ public function benchSymfonyBaseline()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchSymfonyOverhead()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Benchmarks/Integrations/WordPressBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class WordPressBench extends WebFrameworkTestCase
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchWordPressOverhead()
{
Expand All @@ -32,6 +33,7 @@ public function benchWordPressOverhead()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchEnhancedWordPressOverhead()
{
Expand Down Expand Up @@ -82,6 +84,7 @@ public function enableEnhancedWordPressTracing()
* @Iterations(10)
* @OutputTimeUnit("microseconds")
* @RetryThreshold(10.0)
* @Warmup(1)
*/
public function benchWordPressBaseline()
{
Expand Down
Loading