LoginSignup
0
0

More than 1 year has passed since last update.

Next.jsもとい、Node.jsでprofilerを簡単に使う方法

Posted at

現在、Chromeを使うことでGUIベースでProfilerを使用することが可能になっています。
その方法の紹介です。

手順

Next.jsをProfilerを有効な状態で立ち上げる

Next.jsを立ち上げる際に次のようにNODE_OPTIONSをしてして起動してください。

NODE_OPTIONS='--inspect' next dev

ChromeのInspect画面を表示

chrome://inspect にアクセスすると、inspectorが利用可能です。
Devices > Remote targetにinspectオプションを有効にしたプロセスがリストされているので、inspectリンクをクリックしてください

Profilingする

以上
後は開いたウィンドウのProfilerタブからCPUのProfile、MemoryタブからMemoryのProfileを取得できます。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0