diff options
Diffstat (limited to 'tests/metrics-issue-571.php')
-rw-r--r-- | tests/metrics-issue-571.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/metrics-issue-571.php b/tests/metrics-issue-571.php deleted file mode 100644 index 947ae1f7..00000000 --- a/tests/metrics-issue-571.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -use Spiral\Goridge; -use Spiral\RoadRunner; -use Nyholm\Psr7\Factory; - -ini_set('display_errors', 'stderr'); -require __DIR__ . "/vendor/autoload.php"; - -$worker = new RoadRunner\Http\PSR7Worker( - RoadRunner\Worker::create(), - new Factory\Psr17Factory(), - new Factory\Psr17Factory(), - new Factory\Psr17Factory() -); - -$metrics = new RoadRunner\Metrics\Metrics( - Goridge\RPC\RPC::create(RoadRunner\Environment::fromGlobals()->getRPCAddress()) -); - -$metrics->declare( - 'test', - RoadRunner\Metrics\Collector::counter()->withHelp('Test counter') -); - -while ($req = $worker->waitRequest()) { - try { - $rsp = new \Nyholm\Psr7\Response(); - $rsp->getBody()->write("hello world"); - - $metrics->add('test', 1); - - $worker->respond($rsp); - } catch (\Throwable $e) { - $worker->getWorker()->error((string)$e); - } -} |