Pprof
少于1分钟
Pprof
Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.
Fiber 的 Pprof 中间件,通过其 HTTP 服务器运行时配置文件数据提供 pprof 可视化工具预期的格式。通常仅导入该软件包以产生注册其 HTTP 处理程序的副作用。处理的路径均以 /debug/pprof/ 开头。
Signatures 签名
|
|
Examples 示例
Import the middleware package that is part of the Fiber web framework
导入 Fiber Web 框架的一部分中间件包
|
|
After you initiate your Fiber app, you can use the following possibilities:
在启动 Fiber 应用后,您可以使用以下可能性:
|
|
Config 配置
Property 属性 | Type 输入 | Description 说明 | Default 默认 |
---|---|---|---|
Next 下一步 | func(*fiber.Ctx) bool | Next defines a function to skip this middleware when returned true. 接下来定义一个函数,在返回 true 时跳过此中间件。 | nil |
Prefix 前缀 | string | Prefix defines a URL prefix added before “/debug/pprof”. Note that it should start with (but not end with) a slash. Example: “/federated-fiber” 前缀定义了在 “/debug/pprof” 之前添加的 URL 前缀。请注意,它应以斜杠开头(但不以斜杠结尾)。示例:"/federated-fiber" | "" |
Default Config 默认配置
|
|