ifixit/statsd-php-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ifixit/statsd-php-client

Composer 安装命令:

composer require ifixit/statsd-php-client

包简介

A statsd (thanks Etsy!) client for php

关键字:

README 文档

README

This php library makes it simple to send stats you care about to a statsd daemon and has a little more functionality (and tests) than Etsy's default PHP implementation.

See: https://github.com/etsy/statsd

The biggest difference is the addition of a Queue which can be paused and flushed. This allows you to track hundreds of stats in a short time while still only sending one UDP packet at the end of whatever it is you are doing.

Usage

This is meant to be subclassed and the static $host and $port variables overridden.

require('StatsD.php');

StatsD::increment("something");

StatsD::timing("something", $time);

StatsD::gauge("something", $value);

// Arbitrary valued counters (instead of inc / dec)
StatsD::updateStat("something", 42, 0.1); // 0.1 sample rate

// Buffer UDP output packets
StatsD::pauseStatsOutput();
// Bunch of StatsD::increment() or others

// Sends one UDP packet instead of one for each call
StatsD::flushStatsOutput();

Continuous Integration

Tested by Travis CI: Build Status

统计信息

  • 总下载量: 202.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 30
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-10-18