Skip to content

Commit

Permalink
Modify MessagePackSerializationBench.php & TraceAnnotationsBench.php …
Browse files Browse the repository at this point in the history
…to be coherent
  • Loading branch information
PROFeNoM committed Dec 27, 2023
1 parent 41ce0b0 commit fb7b3d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/Benchmarks/API/MessagePackSerializationBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public function benchMessagePackSerialization($traceArray)
public function provideTraceArrays()
{
for ($i = 0; $i < 100; $i++) {
\DDTrace\start_span();
$span = \DDTrace\start_span();
$span->name = 'bench.trace_serialization';
$span->meta['foo'] = 'bar';
$span->metrics['bar'] = 1;
}

for ($i = 0; $i < 100; $i++) {
Expand Down
4 changes: 3 additions & 1 deletion tests/Benchmarks/API/TraceAnnotationsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class TraceAnnotationsBench
*/
public function benchTraceAnnotationOverhead()
{
$this->dummyFunction();
for ($i = 0; $i < 1000; $i++) {
$this->dummyFunction();
}
}

#[\DDTrace\Trace]
Expand Down

0 comments on commit fb7b3d0

Please sign in to comment.