Skip to content

Add gauge increment/decrement shorthands#13

Merged
Envek merged 5 commits intoyabeda-rb:masterfrom
dsalahutdinov:feat/inc
Aug 7, 2020
Merged

Add gauge increment/decrement shorthands#13
Envek merged 5 commits intoyabeda-rb:masterfrom
dsalahutdinov:feat/inc

Conversation

@dsalahutdinov
Copy link
Member

No description provided.

Copy link
Member

@Envek Envek left a comment

Choose a reason for hiding this comment

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

Please rebase on top of fresh master: I fixed Yabeda::Metric#get in 58def01 and now your specs should pass.

context "when gauge has no initial value" do
before { gauge.increment(tags) }

it { expect(gauge.get(tags)).to eq 1 }
Copy link
Member

Choose a reason for hiding this comment

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

IMO correct way to test it would be checking that adapters have received this value:

Suggested change
it { expect(gauge.get(tags)).to eq 1 }
it { gauge.increment(tags) expect(adapter).to have_received(:perform_gauge_set!).with(gauge, tags, 1) }

@dsalahutdinov
Copy link
Member Author

it's done

@Envek Envek merged commit 6f7e712 into yabeda-rb:master Aug 7, 2020
@Envek
Copy link
Member

Envek commented Aug 7, 2020

Released in 0.7.0. Thank you!

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.

2 participants