Netflix 的 FrameScope,將效能資料轉成 2D 圖片

Netflix 丟出了 FlameScope,另外一種顯示效能的工具,將效能資料轉成 2D 圖片:「Netflix FlameScope」。

We’re excited to release FlameScope: a new performance visualization tool for analyzing variance, perturbations, single-threaded execution, application startup, and other time-based issues.

然後這個工具同樣是發明火焰圖的 Brendan Gregg 與他的同事 Martin Spier 的作品:

FlameScope was developed by Martin Spier and Brendan Gregg, Netflix cloud performance engineering team. Blog post by Brendan Gregg.

火焰圖 (flame graph) 就是這個:

這次推出的是這樣的圖:

其實是每秒切一次 offset 做出來的圖:

就可以很簡單的看出來哪些區塊以及 pattern 是熱點:

分析 GitHub 上的 Tab 與 Space

作者用 BigQuery 分析了 GitHub 上的 Tab 與 Space 的差異 (是個 flame war 開始的節奏 XDDD):「400,000 GitHub repositories, 1 billion files, 14 terabytes of code: Spaces or Tabs?」。

可以看到除了 C 與 Go 以外,大多數的程式語言都是 Space > Tab。另外在文章下面也有使用的 BigQuery 指令可以參考。

Flame Graph

常看到這種圖,但卻不知道這種圖是用什麼做出來的,或是他的名字:

剛剛在「Igniting Node.js Flames」這邊看到這叫做 Flame Graph,出自「brendangregg/FlameGraph」這邊。

Linux 上可以用 perf 產生資料檔案,在 FreeBSD 或是 Solaris 上可以用 DTrace 產生... 是個來理解效能瓶頸的好工具 :o