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

feat(checker): Simplify ConvertForCheck function #645

Merged
merged 1 commit into from Jul 13, 2021

Conversation

litleleprikon
Copy link
Contributor

PR Summary

In first versions of a new advanced mode after preparation metrics were
mixed. In one metrics set there was single and multi metrics targets.
Due to this on the step of conversion between
map[TargetName]map[MetricName]metrics to
map[MetricName]map[TargetName]metrics we had to check if some target is
alone metrics target and handle alone metrics targets separately. On the
other hand now on the step of preparation all targets are multi metric
targets and alone metric targets were filtered on the steps before so
we do not need to check alone metrics target on the step of conversion.

Relates #428

In first versions of a new advanced mode after preparation metrics were
mixed. In one metrics set there was single and multi metrics targets.
Due to this on the step of conversion between
map[TargetName]map[MetricName]metrics to
map[MetricName]map[TargetName]metrics we had to check if some target is
alone metrics target and handle alone metrics targets separately. On the
other hand now on the step of preparation all targets are multi metric
targets and alone metric targets were filtered on the steps before so
we do not need to check alone metrics target on the step of conversion.

Relates #428
@litleleprikon litleleprikon requested a review from a team as a code owner July 13, 2021 08:20
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2021

Codecov Report

Merging #645 (5f2dab1) into master (37295b0) will increase coverage by 1.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #645      +/-   ##
==========================================
+ Coverage   69.31%   70.58%   +1.27%     
==========================================
  Files         172      172              
  Lines        7648     8786    +1138     
==========================================
+ Hits         5301     6202     +901     
- Misses       2012     2245     +233     
- Partials      335      339       +4     
Impacted Files Coverage Δ
checker/metrics/conversion/trigger_metrics.go 90.52% <100.00%> (-0.84%) ⬇️
checker/errors.go 75.00% <0.00%> (-6.82%) ⬇️
checker/metrics/conversion/fetched_metrics.go 67.74% <0.00%> (-3.69%) ⬇️
senders/webhook/payload.go 90.90% <0.00%> (-3.54%) ⬇️
image_store/s3/init.go 81.81% <0.00%> (-3.19%) ⬇️
senders/selfstate/selfstate.go 76.19% <0.00%> (-2.76%) ⬇️
senders/twilio/twilio.go 94.44% <0.00%> (-2.62%) ⬇️
senders/telegram/handle_message.go 72.00% <0.00%> (-1.92%) ⬇️
datatypes.go 85.99% <0.00%> (-1.22%) ⬇️
senders/discord/send.go 68.23% <0.00%> (-1.00%) ⬇️
... and 163 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 37295b0...5f2dab1. Read the comment docs.

@litleleprikon litleleprikon merged commit 06e8529 into master Jul 13, 2021
@litleleprikon litleleprikon deleted the feature/simplify-convert-for-check branch July 13, 2021 08:28
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

3 participants