Skip to content
New issue

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

Add metric web for cqld and cql-minerd #227

Merged
merged 19 commits into from
Jan 22, 2019
Merged

Add metric web for cqld and cql-minerd #227

merged 19 commits into from
Jan 22, 2019

Conversation

auxten
Copy link
Contributor

@auxten auxten commented Jan 22, 2019

  • visit /debug/metrics for chart and num
  • visit /debug/vars for json

metric/nodemetricmap.go Outdated Show resolved Hide resolved
rpc/rpcutil.go Outdated Show resolved Hide resolved
rpc/rpcutil.go Outdated Show resolved Hide resolved
@auxten auxten requested a review from laodouya January 22, 2019 07:35
metric/nodemetricmap.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #227 into develop will increase coverage by 0.04%.
The diff coverage is 73.95%.

@@             Coverage Diff             @@
##           develop     #227      +/-   ##
===========================================
+ Coverage    76.03%   76.08%   +0.04%     
===========================================
  Files          136      139       +3     
  Lines        11281    11494     +213     
===========================================
+ Hits          8578     8745     +167     
- Misses        2046     2080      +34     
- Partials       657      669      +12

@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #227 into develop will decrease coverage by 0.04%.
The diff coverage is 73.95%.

@@             Coverage Diff             @@
##           develop     #227      +/-   ##
===========================================
- Coverage    75.95%   75.91%   -0.05%     
===========================================
  Files          136      139       +3     
  Lines        11287    11500     +213     
===========================================
+ Hits          8573     8730     +157     
- Misses        2053     2096      +43     
- Partials       661      674      +13

EB int64 = TB * 1024
// ZB is 1024 EB
ZB int64 = TB * 1024
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be refactored as:

// Defines byte units.
const (
        _        = iota
        KB int64 = 1 << (10 * iota)
        MB
        GB
        TB
        ...
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

Copy link
Member

@laodouya laodouya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


flag.Usage = func() {
fmt.Fprintf(os.Stderr, "\n%s\n\n", desc)
fmt.Fprintf(os.Stderr, "Usage: %s [arguments]\n", name)
_, _ = fmt.Fprintf(os.Stderr, "\n%s\n\n", desc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore return vars explicitly is recommend

@laodouya laodouya merged commit 96945c5 into develop Jan 22, 2019
@laodouya laodouya deleted the feature/httpMetric branch January 22, 2019 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants