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

SampleCountMeasurement improvement #52

Closed
asubb opened this issue May 6, 2020 · 1 comment
Closed

SampleCountMeasurement improvement #52

asubb opened this issue May 6, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request lib

Comments

@asubb
Copy link
Member

asubb commented May 6, 2020

Right now to register a new sample type you need to do something like this:

SampleCountMeasurement.registerType(S::class) { 1 }

For most cases it is used along with the serialization. Would be nice to provide measurement implementation as function of the class:

@Serializable
data class S(val v: Long) : Measured {
  override fun measure(): Int {
     // implementation here
  }
}
@asubb asubb added enhancement New feature or request lib labels May 6, 2020
asubb added a commit that referenced this issue May 6, 2020
@asubb asubb self-assigned this May 6, 2020
asubb added a commit that referenced this issue May 6, 2020
This was referenced May 6, 2020
@asubb
Copy link
Member Author

asubb commented May 6, 2020

Improved in #54

@asubb asubb closed this as completed May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lib
Projects
None yet
Development

No branches or pull requests

1 participant