We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当 goc build --singleton时, 是不是意味着不需要启动 goc server, 此时怎么获取覆盖率文件?
The text was updated successfully, but these errors were encountered:
您好,若使用 singleton 模式時,代表它不會有向 server 註冊自身的動作。
將服務跑起來後,您可以注意到同一資料夾中出現 "${executable_name}_profile_listen_addr",裡面將會有一個 address 的資訊,這個位置提供以下三種 GET API:
"${executable_name}_profile_listen_addr"
/v1/cover/coverage
/v1/cover/profile
/v1/cover/clear
舉例來說,若 goc build . 產出的 binary 為 ./simple-go-server,那麼在它被運行起來時,將會產生一個名為 simple-go-server_profile_listen_addr 的檔案。 假設該檔案的內容為 127.0.0.1:32921,您接著可以使用 curl 127.0.0.1:32921/v1/cover/profile 獲取 profile 資訊。
goc build .
./simple-go-server
simple-go-server_profile_listen_addr
127.0.0.1:32921
curl 127.0.0.1:32921/v1/cover/profile
Sorry, something went wrong.
No branches or pull requests
当 goc build --singleton时, 是不是意味着不需要启动 goc server, 此时怎么获取覆盖率文件?
The text was updated successfully, but these errors were encountered: