Skip to content

Commit

Permalink
adding benchmark for resource creation
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc committed Jan 12, 2024
1 parent cf1559d commit 9d4eb11
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Benchmark/ResourceCreationBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

namespace OpenTelemetry\Tests\Benchmark;

use OpenTelemetry\SDK\Resource\ResourceInfoFactory;

class ResourceCreationBench
{
/**
* @Revs({100, 1000})
* @Iterations(10)
* @OutputTimeUnit("microseconds")
*/
public function bench_create_default_resource(): void
{
ResourceInfoFactory::defaultResource();
}
}

0 comments on commit 9d4eb11

Please sign in to comment.