diff options
author | Valery Piashchynski <[email protected]> | 2022-01-15 12:08:20 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-01-15 12:08:20 +0300 |
commit | 5254c8eb27311e2a8a53a4c90c3829cf1238c563 (patch) | |
tree | b51c9a4c1dd4c25adc511498ce0380a7078c5572 /tests/metrics-issue-571.php | |
parent | 13609dd03dd0d2fa85b9fb850be787bf4e2ea67f (diff) |
Repository content update
Signed-off-by: Valery Piashchynski <[email protected]>
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); - } -} |