全部產品
Search
文件中心

Application Real-Time Monitoring Service:使用Cache加快Instgo編譯速度

更新時間:Feb 06, 2026

本文介紹如何通過Cache加速Instgo編譯速度。

適用範圍

  • 容器方式編譯無效,僅適用於本地或者ECS下編譯。

  • instgo 版本大於1.4.6。

操作步驟

一、下載Instgo

根據當前運行環境下載,可以查看Instgo工具介紹

wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo

二、修改許可權

chmod +x instgo

三、增加Cache參數

./instgo set --goCache=/tmp/go-cache //如這樣把cache設定到目錄/tmp/go-cache中

四、編譯Go應用

如果是在固定的機器中編譯,第一次編譯:

./instgo go build main.go

第二次及以後的編譯會使用上述設定的goCache目錄,加速的編譯流程,整體編譯時間降低50%以上。