Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function timing($key, $value, $sampleRate = 1)
 {
     $this->client->timing($key, $value, $sampleRate);
 }
Esempio n. 2
0
 /**
  * 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);
 }
Esempio n. 3
0
 /**
  * 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);
 }
Esempio n. 4
0
 /**
  * @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());
 }