Skip to content

Conversation

@yngvar-antonsson
Copy link
Contributor

@yngvar-antonsson yngvar-antonsson commented Aug 16, 2021

I didn't forget about

  • Tests
  • Changelog
  • Documentation (README and rst)

Close #260

Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

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

PR's missing changelog and doc edits

Shared.inc(self, num, label_pairs)
end

function Counter:reset(label_pairs)
Copy link
Member

Choose a reason for hiding this comment

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

The original request was about counter initialization. Initialization with counter:reset(label_pairs) seems kinda weird. How about adding an alias for reset as a little syntactic sugar?

Counter.initialize = reset

Copy link
Contributor

Choose a reason for hiding this comment

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

init / reinit / reset, who cares. Reset is better than inc(0), and that's the purpose.

Copy link
Contributor

Choose a reason for hiding this comment

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

Init which resets the value may be considered weird too.

@yngvar-antonsson yngvar-antonsson force-pushed the collector-reset branch 2 times, most recently from 85ddf9d to 762ef62 Compare August 19, 2021 09:24
Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

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

Well, I'm still prefer having both init and reset, but if you're against it, let's at least add the functionality

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.

Counter initialization

3 participants