Repository: qiniu/goc
Pull request #67 (2020-07-09 12:57:50)

cmd profile support get by name or address list
Related to [#66](https://github.com/qiniu/goc/issues/66)

qiniu-bot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/qiniu/goc/pull/67#" title="Author self-approved">tongjingran</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **carlji**
You can assign the PR to them by writing `/assign @carlji` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=qiniu%2Fgoc).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/qiniu/goc/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["carlji"]} -->
CarlJi: This PR fixes #41 also.
CarlJi: Please also update Tips with such points to give user clear message that they can get profiles as choice.
lyyyuna: > This PR fixes #41 also.

@CarlJi 
for #41 
```
			pp, err := NewWorker(addr).Profile()
			if err != nil {
				c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
				return
			}
```

it will still return error, if one of the service unreachable
codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/f4d07c6a933e46d4fe457a29706ab3f87fa07dd1&el=desc) will **decrease** coverage by `0.67%`.
> The diff coverage is `7.14%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
- Coverage   51.03%   50.36%   -0.68%     
==========================================
  Files          32       32              
  Lines        1591     1660      +69     
==========================================
+ Hits          812      836      +24     
- Misses        660      705      +45     
  Partials      119      119              
```


| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `38.59% <0.00%> (-2.92%)` | :arrow_down: |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `16.21% <ø> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `19.53% <2.43%> (-7.65%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `56.49% <0.00%> (ø)` | |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (+11.11%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=footer). Last update [f4d07c6...1a01ad2](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.30%`.
> The diff coverage is `64.19%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.34%   +1.30%     
==========================================
  Files          33       33              
  Lines        1618     1683      +65     
==========================================
+ Hits          923      982      +59     
  Misses        559      559              
- Partials      136      142       +6     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.91% <17.28%> (+0.32%)` | :arrow_up: |
| #unittest | `56.98% <61.72%> (+1.60%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `61.00% <28.57%> (-0.06%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `60.71% <66.66%> (+19.20%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `55.63% <71.66%> (+14.32%)` | :arrow_up: |

tongjingran: The PR fixes https://github.com/qiniu/goc/issues/72 also
codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `0.13%`.
> The diff coverage is `65.33%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   57.18%   +0.13%     
==========================================
  Files          33       32       -1     
  Lines        1618     1677      +59     
==========================================
+ Hits          923      959      +36     
- Misses        559      581      +22     
- Partials      136      137       +1     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `47.44% <64.81%> (+6.14%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-40.00%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `0.13%`.
> The diff coverage is `65.33%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   57.18%   +0.13%     
==========================================
  Files          33       32       -1     
  Lines        1618     1677      +59     
==========================================
+ Hits          923      959      +36     
- Misses        559      581      +22     
- Partials      136      137       +1     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `47.44% <64.81%> (+6.14%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-40.00%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.50%`.
> The diff coverage is `68.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.54%   +1.50%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923      983      +60     
+ Misses        559      555       -4     
- Partials      136      141       +5     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.81% <14.66%> (+0.22%)` | :arrow_up: |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `54.01% <68.51%> (+12.71%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.50%`.
> The diff coverage is `68.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.54%   +1.50%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923      983      +60     
+ Misses        559      555       -4     
- Partials      136      141       +5     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.81% <14.66%> (+0.22%)` | :arrow_up: |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `54.01% <68.51%> (+12.71%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.50%`.
> The diff coverage is `68.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.54%   +1.50%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923      983      +60     
+ Misses        559      555       -4     
- Partials      136      141       +5     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.81% <14.66%> (+0.22%)` | :arrow_up: |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `54.01% <68.51%> (+12.71%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.50%`.
> The diff coverage is `68.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.54%   +1.50%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923      983      +60     
+ Misses        559      555       -4     
- Partials      136      141       +5     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.81% <14.66%> (+0.22%)` | :arrow_up: |
| #unittest | `57.18% <65.33%> (+1.80%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `62.88% <50.00%> (+1.83%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `54.01% <68.51%> (+12.71%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `2.06%`.
> The diff coverage is `80.26%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   59.10%   +2.06%     
==========================================
  Files          33       33              
  Lines        1618     1680      +62     
==========================================
+ Hits          923      993      +70     
+ Misses        559      551       -8     
  Partials      136      136              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.80% <14.47%> (+0.21%)` | :arrow_up: |
| #unittest | `57.86% <80.26%> (+2.48%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `63.26% <60.00%> (+2.21%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `60.58% <85.18%> (+19.27%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `2.06%`.
> The diff coverage is `80.26%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   59.10%   +2.06%     
==========================================
  Files          33       33              
  Lines        1618     1680      +62     
==========================================
+ Hits          923      993      +70     
+ Misses        559      551       -8     
  Partials      136      136              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.80% <14.47%> (+0.21%)` | :arrow_up: |
| #unittest | `57.86% <80.26%> (+2.48%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `63.26% <60.00%> (+2.21%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `60.58% <85.18%> (+19.27%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `0.93%`.
> The diff coverage is `82.89%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   57.98%   +0.93%     
==========================================
  Files          33       32       -1     
  Lines        1618     1678      +60     
==========================================
+ Hits          923      973      +50     
- Misses        559      575      +16     
+ Partials      136      130       -6     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `57.98% <82.89%> (+2.60%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `55.47% <85.18%> (+14.17%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `65.30% <100.00%> (+4.25%)` | :arrow_up: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-40.00%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Z29jLmdv) | | |
| ... and [1 more](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `2.18%`.
> The diff coverage is `82.89%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   59.22%   +2.18%     
==========================================
  Files          33       33              
  Lines        1618     1680      +62     
==========================================
+ Hits          923      995      +72     
+ Misses        559      550       -9     
+ Partials      136      135       -1     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.80% <14.47%> (+0.21%)` | :arrow_up: |
| #unittest | `57.98% <82.89%> (+2.60%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `60.58% <85.18%> (+19.27%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `65.30% <100.00%> (+4.25%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `2.18%`.
> The diff coverage is `82.89%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   59.22%   +2.18%     
==========================================
  Files          33       33              
  Lines        1618     1680      +62     
==========================================
+ Hits          923      995      +72     
+ Misses        559      550       -9     
+ Partials      136      135       -1     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.80% <14.47%> (+0.21%)` | :arrow_up: |
| #unittest | `57.98% <82.89%> (+2.60%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `60.58% <85.18%> (+19.27%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `65.30% <100.00%> (+4.25%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `2.18%`.
> The diff coverage is `82.89%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   59.22%   +2.18%     
==========================================
  Files          33       33              
  Lines        1618     1680      +62     
==========================================
+ Hits          923      995      +72     
+ Misses        559      550       -9     
+ Partials      136      135       -1     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `8.80% <14.47%> (+0.21%)` | :arrow_up: |
| #unittest | `57.98% <82.89%> (+2.60%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `72.63% <ø> (ø)` | |
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `60.58% <85.18%> (+19.27%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.66% <100.00%> (+25.15%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `65.30% <100.00%> (+4.25%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.74%`.
> The diff coverage is `84.72%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.79%   +1.74%     
==========================================
  Files          33       32       -1     
  Lines        1618     1677      +59     
==========================================
+ Hits          923      986      +63     
+ Misses        559      557       -2     
+ Partials      136      134       -2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.79% <84.72%> (+3.41%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `68.57% <89.28%> (+27.26%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (+24.59%)` | :arrow_up: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-40.00%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `1.74%`.
> The diff coverage is `84.72%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   58.79%   +1.74%     
==========================================
  Files          33       32       -1     
  Lines        1618     1677      +59     
==========================================
+ Hits          923      986      +63     
+ Misses        559      557       -2     
+ Partials      136      134       -2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.79% <84.72%> (+3.41%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `68.57% <89.28%> (+27.26%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (+24.59%)` | :arrow_up: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-40.00%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `4.47%`.
> The diff coverage is `84.72%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   61.52%   +4.47%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923     1033     +110     
+ Misses        559      501      -58     
- Partials      136      145       +9     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `22.69% <31.94%> (+14.10%)` | :arrow_up: |
| #unittest | `58.79% <84.72%> (+3.41%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.57% <89.28%> (+32.26%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (+24.59%)` | :arrow_up: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `64.00% <0.00%> (+12.00%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `43.75% <0.00%> (+43.75%)` | :arrow_up: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `66.66% <0.00%> (+55.55%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `4.47%`.
> The diff coverage is `84.72%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   61.52%   +4.47%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923     1033     +110     
+ Misses        559      501      -58     
- Partials      136      145       +9     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `22.69% <31.94%> (+14.10%)` | :arrow_up: |
| #unittest | `58.79% <84.72%> (+3.41%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.57% <89.28%> (+32.26%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (+24.59%)` | :arrow_up: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `64.00% <0.00%> (+12.00%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `43.75% <0.00%> (+43.75%)` | :arrow_up: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `66.66% <0.00%> (+55.55%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=h1) Report
> Merging [#67](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a6dbc7b094fe852358df6c0360ef2762c22e74bc&el=desc) will **increase** coverage by `4.47%`.
> The diff coverage is `84.72%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/67/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
+ Coverage   57.04%   61.52%   +4.47%     
==========================================
  Files          33       33              
  Lines        1618     1679      +61     
==========================================
+ Hits          923     1033     +110     
+ Misses        559      501      -58     
- Partials      136      145       +9     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `22.69% <31.94%> (+14.10%)` | :arrow_up: |
| #unittest | `58.79% <84.72%> (+3.41%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/67?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/cover/instrument.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2luc3RydW1lbnQuZ28=) | `51.35% <ø> (ø)` | |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <37.50%> (+5.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.57% <89.28%> (+32.26%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (+24.59%)` | :arrow_up: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `64.00% <0.00%> (+12.00%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `43.75% <0.00%> (+43.75%)` | :arrow_up: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/67/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `66.66% <0.00%> (+55.55%)` | :arrow_up: |


Patch:
diff --git a/cmd/profile.go b/cmd/profile.go
index 18ae1c6..1050928 100644
--- a/cmd/profile.go
+++ b/cmd/profile.go
@@ -35,17 +35,25 @@ var profileCmd = &cobra.Command{
 # Get coverage counter from default register center http://127.0.0.1:7777, the result output to stdout.
 goc profile
 
-# Get coverage counter from default register center, the result output to specified file.
-goc profile -o ./coverage.cov
-
-# Get coverage counter from specified register center, the result output to specified file.
-goc profile --center=http://192.168.1.1:8080 -o ./coverage.cov
-
 # Get coverage counter from specified register center, the result output to specified file.
 goc profile --center=http://192.168.1.1:8080 --output=./coverage.cov
+
+# Get coverage counter of several specified services. You can get all available service names from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
+goc profile --service=service1,service2,service3
+
+# Get coverage counter of several specified addresses. You can get all available addresses from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
+goc profile --address=address1,address2,address3
+
+# Force to get the coverage counter of all the available services you want.
+goc profile --force
 `,
 	Run: func(cmd *cobra.Command, args []string) {
-		res, err := cover.NewWorker(center).Profile()
+		p := cover.ProfileParam{
+			Force:   force,
+			Service: svrList,
+			Address: addrList,
+		}
+		res, err := cover.NewWorker(center).Profile(p)
 		if err != nil {
 			log.Fatalf("call host %v failed, err: %v, response: %v", center, err, string(res))
 		}
@@ -67,9 +75,15 @@ goc profile --center=http://192.168.1.1:8080 --output=./coverage.cov
 }
 
 var output string
+var force bool
+var svrList []string
+var addrList []string
 
 func init() {
 	profileCmd.Flags().StringVarP(&output, "output", "o", "", "download cover profile")
+	profileCmd.Flags().StringSliceVarP(&svrList, "service", "", nil, "get the cover profile of these services, you can get all available service names from command `goc list`, use this flag and 'address' flag at the same time is illegal.")
+	profileCmd.Flags().StringSliceVarP(&addrList, "address", "", nil, "get the cover profile of these addresses, you can get all available addresses from command `goc list`, use this flag and 'service' flag at the same time is illegal.")
+	profileCmd.Flags().BoolVarP(&force, "force", "f", false, "force to get the coverage counter of all the available services you want")
 	addBasicFlags(profileCmd.Flags())
 	rootCmd.AddCommand(profileCmd)
 }
diff --git a/go.mod b/go.mod
index 2d107a0..1c38ded 100644
--- a/go.mod
+++ b/go.mod
@@ -19,5 +19,6 @@ require (
 	golang.org/x/net v0.0.0-20200301022130-244492dfa37a
 	golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
 	golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65
+	k8s.io/kubernetes v1.13.0
 	k8s.io/test-infra v0.0.0-20200511080351-8ac9dbfab055
 )
diff --git a/go.sum b/go.sum
index aa894bf..d6bec85 100644
--- a/go.sum
+++ b/go.sum
@@ -464,7 +464,6 @@ github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQ
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
 github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
 github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
diff --git a/pkg/cover/client.go b/pkg/cover/client.go
index 2eb1cf0..2c8f030 100644
--- a/pkg/cover/client.go
+++ b/pkg/cover/client.go
@@ -24,12 +24,13 @@ import (
 	"net"
 	"net/http"
 	"net/url"
+	"strconv"
 	"strings"
 )
 
 // Action provides methods to contact with the covered service under test
 type Action interface {
-	Profile() ([]byte, error)
+	Profile(param ProfileParam) ([]byte, error)
 	Clear() ([]byte, error)
 	InitSystem() ([]byte, error)
 	ListServices() ([]byte, error)
@@ -88,13 +89,22 @@ func (c *client) ListServices() ([]byte, error) {
 	return services, err
 }
 
-func (c *client) Profile() ([]byte, error) {
-	u := fmt.Sprintf("%s%s", c.Host, CoverProfileAPI)
+func (c *client) Profile(param ProfileParam) ([]byte, error) {
+	u := fmt.Sprintf("%s%s?force=%s", c.Host, CoverProfileAPI, strconv.FormatBool(param.Force))
+	if len(param.Service) != 0 && len(param.Address) != 0 {
+		return nil, fmt.Errorf("use 'service' and 'address' flag at the same time is illegal")
+	}
+
+	for _, svr := range param.Service {
+		u = u + "&service=" + svr
+	}
+	for _, addr := range param.Address {
+		u = u + "&address=" + addr
+	}
 	profile, err := c.do("GET", u, nil)
 	if err != nil && isNetworkError(err) {
 		profile, err = c.do("GET", u, nil)
 	}
-
 	return profile, err
 }
 
@@ -126,7 +136,6 @@ func (c *client) do(method, url string, body io.Reader) ([]byte, error) {
 	if err != nil {
 		return nil, err
 	}
-
 	return responseBody, nil
 }
 
diff --git a/pkg/cover/instrument.go b/pkg/cover/instrument.go
index 4248d85..78a75dd 100644
--- a/pkg/cover/instrument.go
+++ b/pkg/cover/instrument.go
@@ -54,6 +54,7 @@ import (
 	"strings"
 	"sync/atomic"
 	"testing"
+	"path/filepath"
 
 	{{range $i, $pkgCover := .DepsCover}}
 	_cover{{$i}} {{$pkgCover.Package.ImportPath | printf "%q"}}
@@ -212,7 +213,8 @@ func registerHandlers() {
 }
 
 func registerSelf(address string) ([]byte, error) {
-	req, err := http.NewRequest("POST", fmt.Sprintf("%s/v1/cover/register?name=%s&address=%s", {{.Center | printf "%q"}}, os.Args[0], address), nil)
+	selfName := filepath.Base(os.Args[0])
+	req, err := http.NewRequest("POST", fmt.Sprintf("%s/v1/cover/register?name=%s&address=%s", {{.Center | printf "%q"}}, selfName, address), nil)
 	if err != nil {
 		log.Fatalf("http.NewRequest failed: %v", err)
 		return nil, err
diff --git a/pkg/cover/server.go b/pkg/cover/server.go
index 996946e..10da691 100644
--- a/pkg/cover/server.go
+++ b/pkg/cover/server.go
@@ -30,6 +30,7 @@ import (
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/tools/cover"
 	"k8s.io/test-infra/gopherage/pkg/cov"
+	"strconv"
 )
 
 // DefaultStore implements the IPersistence interface
@@ -82,6 +83,13 @@ type Service struct {
 	Address string `form:"address" json:"address" binding:"required"`
 }
 
+// ProfileParam is param of profile API (TODO)
+type ProfileParam struct {
+	Force   bool     `form:"force"`
+	Service []string `form:"service" json:"service"`
+	Address []string `form:"address" json:"address"`
+}
+
 //listServices list all the registered services
 func listServices(c *gin.Context) {
 	services := DefaultStore.GetAll()
@@ -111,26 +119,49 @@ func registerService(c *gin.Context) {
 		log.Printf("the registed host %s of service %s is different with the real one %s, here we choose the real one", service.Name, host, realIP)
 		service.Address = fmt.Sprintf("http://%s:%s", realIP, port)
 	}
-	if err := DefaultStore.Add(service); err != nil {
-		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
-		return
+
+	address := DefaultStore.Get(service.Name)
+	if !contains(address, service.Address) {
+		if err := DefaultStore.Add(service); err != nil {
+			c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
+			return
+		}
 	}
 
 	c.JSON(http.StatusOK, gin.H{"result": "success"})
+	return
 }
 
 func profile(c *gin.Context) {
-	svrsUnderTest := DefaultStore.GetAll()
-	var mergedProfiles = make([][]*cover.Profile, len(svrsUnderTest))
-	for _, addrs := range svrsUnderTest {
-		for _, addr := range addrs {
-			pp, err := NewWorker(addr).Profile()
+	force, err := strconv.ParseBool(c.Query("force"))
+	if err != nil {
+		c.JSON(http.StatusExpectationFailed, gin.H{"error": "invalid param"})
+		return
+	}
+	svrList := c.QueryArray("service")
+	addrList := c.QueryArray("address")
+	svrsAll := DefaultStore.GetAll()
+	svrsUnderTest, err := getSvrUnderTest(svrList, addrList, force, svrsAll)
+	if err != nil {
+		c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
+	}
+
+	var mergedProfiles = make([][]*cover.Profile, 0)
+	for _, svrs := range svrsUnderTest {
+		for _, addr := range svrs {
+			pp, err := NewWorker(addr).Profile(ProfileParam{})
 			if err != nil {
+				if force {
+					continue
+				}
 				c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
 				return
 			}
 			profile, err := convertProfile(pp)
 			if err != nil {
+				if force {
+					continue
+				}
 				c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 				return
 			}
@@ -194,3 +225,58 @@ func convertProfile(p []byte) ([]*cover.Profile, error) {
 
 	return cover.ParseProfiles(tf.Name())
 }
+
+func contains(arr []string, str string) bool {
+	for _, element := range arr {
+		if str == element {
+			return true
+		}
+	}
+	return false
+}
+
+// getSvrUnderTest get service map by service and address list
+func getSvrUnderTest(svrList, addrList []string, force bool, svrsAll map[string][]string) (svrsUnderTest map[string][]string, err error) {
+	svrsUnderTest = map[string][]string{}
+	if len(svrList) != 0 && len(addrList) != 0 {
+		return nil, fmt.Errorf("use this flag and 'address' flag at the same time is illegal")
+	}
+	// Return all servers when all param is nil
+	if len(svrList) == 0 && len(addrList) == 0 {
+		return svrsAll, nil
+	} else {
+		// Add matched services to map
+		if len(svrList) != 0 {
+			for _, name := range svrList {
+				if addr, ok := svrsAll[name]; ok {
+					svrsUnderTest[name] = addr
+					continue // jump to match the next service
+				}
+				if !force {
+					return nil, fmt.Errorf("service [%s] not found", name)
+				}
+			}
+		}
+		// Add matched addresses to map
+		if len(addrList) != 0 {
+		I:
+			for _, addr := range addrList {
+				for svr, addrs := range svrsAll {
+					if contains(svrsUnderTest[svr], addr) {
+						continue I // The address is duplicate, jump over
+					}
+					for _, a := range addrs {
+						if a == addr {
+							svrsUnderTest[svr] = append(svrsUnderTest[svr], a)
+							continue I // jump to match the next address
+						}
+					}
+				}
+				if !force {
+					return nil, fmt.Errorf("address [%s] not found", addr)
+				}
+			}
+		}
+	}
+	return svrsUnderTest, nil
+}


Test patch:
diff --git a/pkg/cover/client_test.go b/pkg/cover/client_test.go
index 273355f..9bff493 100644
--- a/pkg/cover/client_test.go
+++ b/pkg/cover/client_test.go
@@ -22,17 +22,33 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
+	"net/http"
 )
 
 func TestClientAction(t *testing.T) {
+	// mock goc server
 	ts := httptest.NewServer(GocServer(os.Stdout))
 	defer ts.Close()
 	var client = NewWorker(ts.URL)
 
+	// mock profile server
+	profileMockResponse := "mode: count\nmockService/main.go:30.13,48.33 13 1"
+	profileSuccessMockSvr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+		w.WriteHeader(http.StatusOK)
+		w.Write([]byte(profileMockResponse))
+	}))
+	defer profileSuccessMockSvr.Close()
+
+	profileErrMockSvr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+		w.WriteHeader(http.StatusOK)
+		w.Write([]byte("error"))
+	}))
+	defer profileErrMockSvr.Close()
+
 	// regsiter service into goc server
 	var src Service
-	src.Name = "goc"
-	src.Address = "http://127.0.0.1:7777"
+	src.Name = "serviceSuccess"
+	src.Address = profileSuccessMockSvr.URL
 	res, err := client.RegisterService(src)
 	assert.NoError(t, err)
 	assert.Contains(t, string(res), "success")
@@ -43,6 +59,72 @@ func TestClientAction(t *testing.T) {
 	assert.Contains(t, string(res), src.Address)
 	assert.Contains(t, string(res), src.Name)
 
+	// get porfile from goc server
+	profileItems := []struct {
+		service Service
+		param   ProfileParam
+		res     string
+	}{
+		{
+			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
+			param:   ProfileParam{Force: false, Service: []string{"serviceOK"}, Address: []string{profileSuccessMockSvr.URL}},
+			res:     "use 'service' and 'address' flag at the same time is illegal",
+		},
+		{
+			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
+			param:   ProfileParam{},
+			res:     profileMockResponse,
+		},
+		{
+			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
+			param:   ProfileParam{Service: []string{"serviceOK"}},
+			res:     profileMockResponse,
+		},
+		{
+			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
+			param:   ProfileParam{Address: []string{profileSuccessMockSvr.URL}},
+			res:     profileMockResponse,
+		},
+		{
+			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
+			param:   ProfileParam{Service: []string{"unknown"}},
+			res:     "service [unknown] not found",
+		},
+		{
+			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
+			res:     "bad mode line: error",
+		},
+		{
+			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
+			param:   ProfileParam{Force: true},
+			res:     "no profiles",
+		},
+		{
+			service: Service{Name: "serviceNotExist", Address: "http://172.0.0.2:7777"},
+			res:     "connection refused",
+		},
+		{
+			service: Service{Name: "serviceNotExist", Address: "http://172.0.0.2:7777"},
+			param:   ProfileParam{Force: true},
+			res:     "no profiles",
+		},
+	}
+	for _, item := range profileItems {
+		// init server
+		res, err := client.InitSystem()
+		assert.NoError(t, err)
+		// register server
+		res, err = client.RegisterService(item.service)
+		assert.NoError(t, err)
+		assert.Contains(t, string(res), "success")
+		res, err = client.Profile(item.param)
+		if err != nil {
+			assert.Equal(t, err.Error(), item.res)
+		} else {
+			assert.Contains(t, string(res), item.res)
+		}
+	}
+
 	// init system and check service again
 	res, err = client.InitSystem()
 	assert.NoError(t, err)
diff --git a/pkg/cover/server_test.go b/pkg/cover/server_test.go
new file mode 100644
index 0000000..1e6d928
--- /dev/null
+++ b/pkg/cover/server_test.go
@@ -0,0 +1,60 @@
+package cover
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+func TestContains(t *testing.T) {
+	assert.Equal(t, contains([]string{"a", "b"}, "a"), true)
+	assert.Equal(t, contains([]string{"a", "b"}, "c"), false)
+}
+
+func TestGetSvrUnderTest(t *testing.T) {
+	svrAll := map[string][]string{
+		"service1": {"http://127.0.0.1:7777", "http://127.0.0.1:8888"},
+		"service2": {"http://127.0.0.1:9999"},
+	}
+	items := []struct {
+		svrList  []string
+		addrList []string
+		force    bool
+		err      string
+		svrRes   map[string][]string
+	}{
+		{
+			svrList:  []string{"service1"},
+			addrList: []string{"http://127.0.0.1:7777"},
+			err:      "use this flag and 'address' flag at the same time is illegal",
+		},
+		{
+			svrRes: svrAll,
+		},
+		{
+			svrList: []string{"service1", "unknown"},
+			err:     "service [unknown] not found",
+		},
+		{
+			svrList: []string{"service1", "service1", "service2", "unknown"},
+			force:   true,
+			svrRes:  svrAll,
+		},
+		{
+			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.2:7777"},
+			err:      "address [http://127.0.0.2:7777] not found",
+		},
+		{
+			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.1:7777", "http://127.0.0.1:9999", "http://127.0.0.2:7777"},
+			force:    true,
+			svrRes:   map[string][]string{"service1": {"http://127.0.0.1:7777"}, "service2": {"http://127.0.0.1:9999"}},
+		},
+	}
+	for _, item := range items {
+		svrs, err := getSvrUnderTest(item.svrList, item.addrList, item.force, svrAll)
+		if err != nil {
+			assert.Equal(t, err.Error(), item.err)
+		} else {
+			assert.Equal(t, svrs, item.svrRes)
+		}
+	}
+}