From d00a6b8152f0edba89283cf8f41897e5061a5bed Mon Sep 17 00:00:00 2001 From: eeliu <27064129+eeliu@users.noreply.github.com> Date: Tue, 21 Dec 2021 11:33:53 +0800 Subject: [PATCH] update reademe (#26) --- Readme.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Readme.md b/Readme.md index 8050df4..0722f6d 100644 --- a/Readme.md +++ b/Readme.md @@ -59,33 +59,45 @@ This could be found in PHP/pinpoint_php_example/app/index.php. require_once __DIR__."/../vendor/autoload.php"; // A writable path for caching AOP code -define('AOP_CACHE_DIR',__DIR__.'/Cache/'); +define('AOP_CACHE_DIR',__DIR__.'/../Cache/'); // Your plugins directory: All plugins must have a suffix "Plugin.php",as "CommonPlugin.php mysqlPlugin.php RPCPlugin.php" define('PLUGINS_DIR',__DIR__.'/../Plugins/'); -// since 0.2.3 supports user filter when loadering a class. -define('USER_DEFINED_CLASS_MAP_IMPLEMENT','\Plugins\ClassMapInFile.php'); // since 0.2.5+ PINPOINT_USE_CACHE = N, auto_pinpointed.php will generate Cache/* on every request. -define('PINPOINT_USE_CACHE','no'); +define('PINPOINT_USE_CACHE','YES'); // Use pinpoint-php-aop auto_pinpointed.php instead of vendor/autoload.php require_once __DIR__. '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php'; ``` -#### How to use setting.ini +#### setting.ini + +Namespace conversion table for special class/function + +> How to use? + +[setting.ini](lib/Pinpoint/test/setting.ini) + -> Read the setting.ini comments ### How it works -pinpoint-php-aop wrappers your class with an onBefore/onEnd/onException suite. +* Use `nikic/PHP-Parser` generating glue layer code + +* Use namespace replace to reuse plugins or hook build-in class/function +* Intercept php classloader to redirect origin class bettween proxied class + + +> pinpoint-php-aop wrappers your class with an onBefore/onEnd/onException suite. + +#### Data Chart Map ![how it works](https://raw.githubusercontent.com/pinpoint-apm/pinpoint-c-agent/master/images/principle_v0.2.x.png) More details please go to lib/pinpoint/test/Comparison/pinpoint/test -> If you found a bug, please create an issue to us without any hesitate. -> If it could help you, please give us a star as a support! Thanks! +> PS: If you found a bug, please create an issue to us without any hesitate. + ## Copyright