Closed allcentury closed 3 years ago
hey @allcentury do you know how to rebase and squash some of your commits together? It makes for a cleaner git history in the future. (the changes now are the history in the future... Marty McFly would be proud)
Hey @allcentury - do you have more to add here or are you waiting on my input?
@kbrock - yes, I follow the fixup
flow until it's ready to merge, then I squash.
@nateberkopec - thanks! Ya, could use your input:
option A:
quiet
in favor of setting a reporter
. NoopReporter
. quiet
with NoopReporter
Reporter
as long as it conforms to the interfaceCsvReporter
, JsonReporter
, etc. option B:
quiet
and don't surface the reporter
ideaInitially I thought reporter
could allow users to write their own formatters like csv
, json
, etc. However I see there is a format option. As it stands w/ this PR:
StdoutReport
:
NoopReport
:
:format
Can you think of a good reason to have users inject their own Report
class? I can't without conflating format. So I'm leaning towards Option B now. Thoughts?
Can you think of a good reason to have users inject their own Report class? I can't without conflating format. So I'm leaning towards Option B now. Thoughts?
There was a request https://github.com/evanphx/benchmark-ips/issues/81 to be able to capture the output. So as long as you could set a string output buffer or something, then that would move this gem towards solving that issue. I had started on a PR to solve that issue but I like where this PR is going and can fix the other PR after you are done here.
Well, I don't have any desire to get rid of quiet
. I think setting quiet
should just silently swap out the reporter in the background. So I guess that makes me option B? I don't think the other decisions/points in the PR need to be solved today, maybe we merge reporters/formatters in the future but I don't think that has to be solved now.
@nateberkopec - thanks for that. I think this is ready for your review then.
1 rename and it's GTG
@nateberkopec perfect, thank you! I removed the set
and now reporter
is a pure function which quiet=
relies on.
Thank you @allcentury
thank you @allcentury
This aims to close #112.
I removed references to
Benchmark::Suite
- I couldn't find anywhere this was used and the original commit goes back a long ways. This looks like a relic to a class or module that I'm not able to find in git history viaAll config gets passed into
job.config job_opts
and now the block is evaluated last allowing overrides.