diff --git a/README-CN.md b/README-CN.md index 516dda67..821496de 100644 --- a/README-CN.md +++ b/README-CN.md @@ -129,6 +129,24 @@ $ gofs -src="rs://127.0.0.1:9016?mode=server&local_sync_disabled=true&path=./src $ gofs -src="rs://127.0.0.1:9016" -target=./target -users="gofs|password" ``` +### 性能分析 + +基于[Web文件服务器](#web文件服务器)启用性能分析工具pprof + +默认情况下,仅允许私有地址和回环地址访问pprof相关路由 + +你可以通过将`pprof_private`设置为`false`来禁用默认行为,允许公网IP访问pprof路由 + +```bash +$ gofs -src=./src -target=./target -server -tls_cert_file=cert.pem -tls_key_file=key.pem -rand_user_count=3 -pprof +``` + +pprof访问地址如下: + +``` +https://127.0.0.1/debug/pprof/ +``` + ## 更多信息 ### 帮助信息 diff --git a/README.md b/README.md index d32f1175..f37d7fdb 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,24 @@ Use the `sync_cron` flag to sync the whole path from remote disk server to local $ gofs -src="rs://127.0.0.1:9016" -target=./target -users="gofs|password" ``` +### Profiling + +Enable pprof base [File Server](#file-server). + +By default, allow to access pprof route by private address and loopback address only. + +You can disable it by setting the `pprof_private` to `false`. + +```bash +$ gofs -src=./src -target=./target -server -tls_cert_file=cert.pem -tls_key_file=key.pem -rand_user_count=3 -pprof +``` + +The pprof url address like this + +``` +https://127.0.0.1/debug/pprof/ +``` + ## For More Information ### Help Info