Skip to content

一个监控代码性能的php扩展。a php extension for monitor your code performance

License

Notifications You must be signed in to change notification settings

fucongcong/Group-Ext-apm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ext_group-apm

a php extension for monitor your code performance.

Support

  • php5.6
  • php7

Install

phpize
./configure
make && make install

php.ini config

//add the extension
extension="group_apm.so"

//default is 1;
group_apm.enabled = 1;

restart your php-fpm

Get start

    <?php
    /*
     * your code
     * do something
     *
     *
     */

    //get the monitor
    $data = group_apm();

data sample

    
    array (
      't' => 0.0019829273223876953,
      'cf' => 'Group\\App\\App::__construct=>/private/var/www/Group/vendor/group/group-framework/core/Group/App/App.php:78',
      'id' => 29,
      'pf_id' => 22,
    )
  • t => the func call time
  • cf => func name and filename:line
  • id => current func id
  • pf_id => parent func id

tips

It will record the func calltime > 1ms.

example1

php example/group_res.php

example2

php example/group_apm.php

About

一个监控代码性能的php扩展。a php extension for monitor your code performance

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published