用 zsh-bench 來測試 zsh 啟動速度

在調效 zsh 環境時 (使用 Prezto 取代 Oh-My-Zsh),找到一個算是簡單上手的效能測試工具 zsh-bench (https://github.com/romkatv/...

03 June 2024 · 2 min · nyo

如何寫 Go 的效能測試(Benchmark)

go 的測試工具 go test 有 benchmark 工具可以使用。 不用自己寫工具就可以很輕鬆的測試程式碼效能。 開始寫 benchmark 測試 建立 _test.go 結尾的檔案 function 要以 Benchmark 開頭 使用 b *testing.B 參數 將要測試的...

15 July 2023 · 2 min · nyo