From 4400ca5bc9d4edc9cb117867e32b39fe166a50f8 Mon Sep 17 00:00:00 2001 From: williamfzc <178894043@qq.com> Date: Fri, 5 Aug 2022 10:17:41 +0000 Subject: [PATCH] add intro for #293 in doc --- README.md | 2 ++ README_zh.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 30cd644e..e787ad29 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ We provide a vscode extension - [Goc Coverage](https://marketplace.visualstudio. 2. After service restarted and test finished, collect coverage again with `goc profile -o b.cov` 3. Merge two coverage profiles together: `goc merge a.cov b.cov -o merge.cov` +5. By default, goc will use the artifact's file name as its service name. You can overwrite it by setting environment variable `GOC_SERVICE_NAME`. (See [#293](https://github.com/qiniu/goc/issues/293) for details) + ## RoadMap - [x] Support code coverage collection for system testing. - [x] Support code coverage counters clear for the services under test at runtime. diff --git a/README_zh.md b/README_zh.md index 847cb74d..f5159faa 100644 --- a/README_zh.md +++ b/README_zh.md @@ -87,6 +87,8 @@ goc 可以实时收集长时运行的 golang 服务覆盖率。收集步骤只 2. 测试结束后,通过 `goc profile -o b.cov` 命令再收集一次覆盖率 3. 通过 `goc merge a.cov b.cov -o merge.cov` 命令合并两次的覆盖率 +5. 默认情况下,goc使用编译产物的名称作为注册标识。你可以通过设置 `GOC_SERVICE_NAME` 环境变量以自定义该标识(可参见 [#293](https://github.com/qiniu/goc/issues/293))。 + ## Blogs - [Go语言系统测试覆盖率收集利器 goc](https://mp.weixin.qq.com/s/DzXEXwepaouSuD2dPVloOg)