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

Add Scenario.data_processed? to simplify checks in formatters #268

Merged
merged 2 commits into from
Feb 10, 2019

Conversation

PragTob
Copy link
Member

@PragTob PragTob commented Feb 9, 2019

Formatters often have to check whether run time or memory data
was processed - so if data was collected at all and if statistics
have already been generated so that they can be rendered.

This should simplify this/not tie all of them to the internal
data structure.

The decision as made to check directly on statistics to see if
values actually made it into it, rather than just checking the
configuration if it was intended to measure, so that we're sure
that values are there.

This might sound like a check on Suite to check if all scenarios
have all data might be a good thing, however mostly formatters
split things by input so it will more often be checked on a
sub set of scenarios or individual scenarios.

This PR doesn't use the function in our formatters yet, to avoid
merge conflicts with #264 :) #264 will have to adjust its
implementation though, but that should be very easy and straight
forward.

Formatters often have to check whether run time or memory data
was processed - so if data was collected at all and if statistics
have already been generated so that they can be rendered.

This should simplify this/not tie all of them to the internal
data structure.

The decision as made to check directly on statistics to see if
values actually made it into it, rather than just checking the
configuration if it was intended to measure, so that we're sure
that values are there.

This might sound like a check on `Suite` to check if all scenarios
have all data might be a good thing, however mostly formatters
split things by input so it will more often be checked on a
sub set of scenarios or individual scenarios.

This PR doesn't use the function in our formatters yet, to avoid
merge conflicts with #264 :) #264 will have to adjust its
implementation though, but that should be very easy and straight
forward.
@PragTob
Copy link
Member Author

PragTob commented Feb 9, 2019

bencheeorg/benchee_html#49 shows how I want this to be used :)

@PragTob
Copy link
Member Author

PragTob commented Feb 10, 2019

Needs this for release, know that @devonestes can't make it atm - so will yolo solo merge but would love it if when back @devonestes took a look at it - we're pre 1.0 we can still rename it with the next release 👼

@PragTob PragTob merged commit 0261693 into master Feb 10, 2019
@PragTob PragTob deleted the scenario-data-processed branch February 10, 2019 09:11
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

1 participant