/** * @inheritdoc */ public function timing($key, $value, $sampleRate = 1) { $this->client->timing($key, $value, $sampleRate); }
/** * Creates a timing list in statsd. * * @static * * @param string $name the name of the key * @param int $time the time it took for the request/execution to finish */ public function timing($name, $time) { $this->statsd->timing($name, $time); }
/** * Timing metric * * @param string $key Something like: 'foo.bar' * @param int $value Something like: 320 */ private function timing($key, $value) { $this->client->timing($key, $value); }
/** * @group sampling */ public function testTimingWithSamplingRate() { $client = new Client($this->connection, 'test', 0.1); $client->timing('foo.baz', 2000, 1); $this->assertEquals('test.foo.baz:2000|ms|@0.1', $this->connection->getLastMessage()); }