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

lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
@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.

lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
lib/tagset/tagset.go Outdated Show resolved Hide resolved
@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
js/modules/k6/ws/ws_test.go Show resolved Hide resolved
js/modules/k6/http/request_test.go Show resolved Hide resolved
cmd/config_consolidation_test.go Outdated Show resolved Hide resolved
cmd/config_consolidation_test.go Outdated Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
@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
stats/system_tag.go Outdated Show resolved Hide resolved
stats/system_tag.go Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
stats/system_tag_test.go Outdated Show resolved Hide resolved
stats/system_tag_test.go Outdated Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
stats/system_tag_set.go Outdated Show resolved Hide resolved
stats/system_tag_set.go Outdated Show resolved Hide resolved
stats/system_tag_set.go Outdated Show resolved Hide resolved
stats/system_tag_set.go Outdated Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
lib/options.go Show resolved Hide resolved
cmd/options.go Show resolved Hide resolved
js/modules/k6/ws/ws_test.go Outdated Show resolved Hide resolved
js/modules/k6/ws/ws_test.go Outdated Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
stats/datadog/collector.go Outdated Show resolved Hide resolved
stats/influxdb/collector.go Show resolved Hide resolved
@cuonglm cuonglm requested review from na-- and mstoykov October 14, 2019 15:59
stats/system_tag_set.go Outdated Show resolved Hide resolved
cmd/options.go Show resolved Hide resolved
stats/system_tag.go Outdated Show resolved Hide resolved
stats/datadog/collector.go Outdated Show resolved Hide resolved
stats/datadog/collector_test.go Outdated Show resolved Hide resolved
js/modules/k6/ws/ws_test.go Outdated Show resolved Hide resolved
@na-- na-- mentioned this pull request Oct 15, 2019
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
Collaborator

@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

stats/system_tag.go Show resolved Hide resolved
mstoykov
mstoykov previously approved these changes Oct 17, 2019
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