diff --git a/tests/Benchmarks/Integrations/EmptyFileBench.php b/tests/Benchmarks/Integrations/EmptyFileBench.php new file mode 100644 index 0000000000..69ed317b34 --- /dev/null +++ b/tests/Benchmarks/Integrations/EmptyFileBench.php @@ -0,0 +1,67 @@ +call(GetSpec::create( + 'A web request to a framework not using auto loaders', + '/' + )); + } + + /** + * @BeforeMethods("enableTracing") + * @AfterMethods("afterMethod") + * @Revs(10) + * @Iterations(10) + * @OutputTimeUnit("microseconds") + * @RetryThreshold(10.0) + */ + public function benchEmptyFileOverhead() + { + $this->call(GetSpec::create( + 'A web request to a framework not using auto loaders', + '/' + )); + } + + public static function getAppIndexScript() + { + return __DIR__ . '/../../Frameworks/Custom/Version_Not_Autoloaded/index.php'; + } + + public function disabledTracing() + { + $this->setUpWebServer([ + 'DD_TRACE_ENABLED' => 0, + ]); + } + + public function afterMethod() + { + $this->TearDownAfterClass(); + } + + public function enableTracing() + { + $this->setUpWebServer([ + 'DD_TRACE_ENABLED' => 1, + ]); + } +}