@yunflyjs/yunfly-plugin-v8-profiler
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@yunke/yunfly-plugin-v8-profiler

  • 实时获取 cpuprofile 插件
  1. 实时在线生成 cpuprofile,支持10s, 30s, 1m, 2m, 5m 数据
  2. 支持界面查看生成的 cpuprofile 数据列表
  3. 支持在线下载
  4. 支持在线实时分析 cpuprofile 数据

使用

  1. 安装
yarn add @yunke/yunfly-plugin-v8-profiler
  1. 使用插件

config.plugin.ts 中声明插件

const plugins: { [key: string]: string }[] = [
  {
    name: 'v8profile',
    package: '@yunke/yunfly-plugin-v8-profiler',
  },
];
export default plugins;

注意事项

若 src/middleware/* 中存在 @Middleware({ type: 'before' }) 中间件且未被 config.routingControllersOptions.middlewares 加载的中间件时,需要剔除@Middleware({ type: 'before' })标识,否则有可能会被当成全局插件加载。

界面 demo

生成 cpuprofile cpuprofile

在线分析 在线分析

操作指引

  1. 界面网址
  • 开发环境
// 开发环境为本地服务+端口+固定路由
// 例如:BFF服务端口号为3000
http://127.0.0.1:3000/v8-profiler/view

Package Sidebar

Install

npm i @yunflyjs/yunfly-plugin-v8-profiler

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

2.98 MB

Total Files

37

Last publish

Collaborators

  • wangweianger