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

Refactoring lib.TagSet #1148

Merged
merged 12 commits into from
Oct 17, 2019
Merged

Refactoring lib.TagSet #1148

merged 12 commits into from
Oct 17, 2019

Conversation

cuonglm
Copy link
Contributor

@cuonglm cuonglm commented Sep 9, 2019

This PR introduce new SystemTagSet, SystemTagMap under stats package.

  • SystemTagMap is the same as old lib.TagSet.
  • SystemTagSet is a bit mask.

Putting them under stats package is more appropriate and have better semantic, also it help reducing complexity of current lib package and prevent import cycle.

Old lib.TagSet is removed.

Close #755

@cuonglm cuonglm requested review from mstoykov, imiric and na-- September 9, 2019 14:48
@codecov-io
Copy link

codecov-io commented Sep 9, 2019

Codecov Report

Merging #1148 into master will decrease coverage by 0.03%.
The diff coverage is 70.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1148      +/-   ##
==========================================
- Coverage   73.67%   73.63%   -0.04%     
==========================================
  Files         145      147       +2     
  Lines       10604    10639      +35     
==========================================
+ Hits         7812     7834      +22     
- Misses       2333     2345      +12     
- Partials      459      460       +1
Impacted Files Coverage Δ
lib/options.go 93.14% <ø> (+0.1%) ⬆️
stats/dummy/collector.go 60% <0%> (ø) ⬆️
stats/influxdb/collector.go 76.85% <0%> (ø) ⬆️
stats/kafka/collector.go 50.68% <0%> (ø) ⬆️
stats/cloud/collector.go 71.38% <0%> (ø) ⬆️
stats/json/collector.go 12.34% <0%> (ø) ⬆️
cmd/collectors.go 0% <0%> (ø) ⬆️
js/modules/k6/ws/ws.go 81.3% <100%> (ø) ⬆️
stats/csv/collector.go 83.78% <100%> (ø) ⬆️
cmd/options.go 67.76% <100%> (ø) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce85f80...b0bd035. Read the comment docs.

@cuonglm

This comment has been minimized.

@na-- na-- changed the title lib/tagset: add tag set as bitmask [WIP] lib/tagset: add tag set as bitmask Sep 13, 2019
@na-- na-- added this to the v0.26.0 milestone Sep 13, 2019
@cuonglm cuonglm changed the title [WIP] lib/tagset: add tag set as bitmask lib/tagset: add tag set as bitmask Sep 18, 2019
imiric
imiric previously approved these changes Sep 24, 2019
@cuonglm cuonglm changed the title lib/tagset: add tag set as bitmask Refactoring lib.TagSet Sep 25, 2019
@cuonglm cuonglm requested review from imiric and na-- September 27, 2019 03:41
@cuonglm cuonglm force-pushed the feature/755 branch 2 times, most recently from 514bbc9 to 7d735e2 Compare September 30, 2019 05:28
@cuonglm cuonglm requested review from na-- and mstoykov October 14, 2019 15:59
@na-- na-- mentioned this pull request Oct 15, 2019
@cuonglm cuonglm requested a review from na-- October 15, 2019 11:41
na--
na-- previously approved these changes Oct 17, 2019
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for patiently working through all of the reviews!

Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

LGTM but if you can just change to use map[string]struct{} instead of map[string]bool

mstoykov
mstoykov previously approved these changes Oct 17, 2019
@cuonglm cuonglm dismissed stale reviews from mstoykov and na-- via 5c82b54 October 17, 2019 12:49
@cuonglm cuonglm requested review from na-- and mstoykov October 17, 2019 12:50
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.

Refactor lib.TagSet to use a bitmask/bitset
6 participants