承接 pmg/metrics 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

pmg/metrics

Composer 安装命令:

composer require pmg/metrics

包简介

Generic metrics, PHP Style.

README 文档

README

Warning: this is very unstable software right now. PMG is adding features to this as we need them.

Core Concepts

  • A Collector collects metrics over the course of an application lifecycle and stores them someplace locally (usually just in memory)
  • A Reporter takes a metric set flushed out of a collector and sends it to a real metrics backend (like cloudwatch).
  • A Metric is just some sort of measurement taken with an application. Comes in several flavors.
    • A Gauge is a static value taken at a point in time.

Usage Example

use PMG\Metrics\Metrics;
use PMG\Metrics\Gauge;

$collector = Metrics::collector();

// track `someName` with a count gauge with a value of 10
$collector->gauge('someName', Gauge::count(10));

// Same as the above but tag `someName` with dimensions
$collector->gauge(
    Metrics::name('someName')->dimension('example', '1'),
    Gauge::count(10)
);

/* @var Reporter $reporter **/
$reporter->reportOn($collector->flush());

// $collector is now empty and ready to go

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-10-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固