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

gmeasure provides BETA support for benchmarking #447

Merged
merged 1 commit into from May 27, 2021
Merged

gmeasure provides BETA support for benchmarking #447

merged 1 commit into from May 27, 2021

Conversation

onsi
Copy link
Owner

@onsi onsi commented May 27, 2021

gmeasure is a new gomega subpackage intended to provide measurement and benchmarking support for durations and values. gmeasure replaces Ginkgo V1s deprecated Measure nodes and provides a migration path for users migrating to Ginkgo V2.

gmeasure is organized around an Experiment metaphor. Experiments can record several different Measurements, with each Measurement comprised of multiple data points. Measurements can hold time.Durations and float64 values and gmeasure includes support measuring the duraiton of callback functions and for sampling functions repeatedly to build an ensemble of data points. In addition, gmeasure introduces a Stopwatch abtraction for easily measuring and recording durations of code segments.

Once measured, users can readily generate Stats for Measurements to capture their key statistics and these stats can be ranked using a Ranking and associated RankingCriteria.

Experiments can be Cached to disk to speed up subsequent runs. Experiments are cached by name and version number which makes it easy to manage and bust the cache.

Finally, gmeasure integrates with Ginkgo V2 via the new ReportEntry abstraction. Experiments, Measurements, and Rankings can all be registered via AddReportEntry. Doing so generates colorful reports as part of Ginkgo's test output.

gmeasure is currently in beta and will go GA around when Ginkgo V2 goes GA.

gmeasure is a new gomega subpackage intended to provide measurement and benchmarking support for durations and values.  gmeasure replaces Ginkgo V1s deprecated Measure nodes and provides a migration path for users migrating to Ginkgo V2.

gmeasure is organized around an Experiment metaphor. Experiments can record several different Measurements, with each Measurement comprised of multiple data points.  Measurements can hold time.Durations and float64 values and gmeasure includes support measuring the duraiton of callback functions and for sampling functions repeatedly to build an ensemble of data points.  In addition, gmeasure introduces a Stopwatch abtraction for easily measuring and recording durations of code segments.

Once measured, users can readily generate Stats for Measurements to capture their key statistics and these stats can be ranked using a Ranking and associated RankingCriteria.

Experiments can be Cached to disk to speed up subsequent runs.  Experiments are cached by name and version number which makes it easy to manage and bust the cache.

Finally, gmeasure integrates with Ginkgo V2 via the new ReportEntry abstraction.  Experiments, Measurements, and Rankings can all be registered via AddReportEntry.  Doing so generates colorful reports as part of Ginkgo's test output.

gmeasure is currently in beta and will go GA around when Ginkgo V2 goes GA.
@onsi onsi merged commit 8f2dfbf into master May 27, 2021
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