- Changed:
-
A few improvements were made to avoid the need for Node polyfills in the browser:
- Replaced
browser-process-hrtime
withbrowser-hrtime
- Replaced
events
witheventemitter3
- Removed reporter re-exports from root module (because Jest reporter requires
fs
)
- Replaced
-
- Added:
- A
totalDuration
field in theMeasurement
class and related output in the reporting. This is mainly useful whenserial
is false, so you can see the total real time spent. (Contributed by stephenh)
- A
- Added:
- Support for an
extensions
option in each reporter. Currently, this allows printing extra reports after the main one.
- Support for an
- Added:
Benchmark.measurements
getter for a list ofMeasurement
from the rawBenchmark.data
.Benchmark.find()
andCriteria
to determine the fastest/slowest measurement.Measurement.description
field, which is used byBenchmark.measurements
andBenchmark.find()
so that each measurement retains its context.
- Fixed:
- Updated mathjs dependency to resolve a security vulnerability. (Contributed by buge)
- Added
keepStateAtStart
option for the Jest reporter. (Contributed by thomaschaplin)
- Added
printReportAtEnd
reporter option. (Contributed by thomaschaplin) - Fixed an error in the Jest reporter when no Kelonio tests were executed. (Contributed by thomaschaplin)
- Added
keepStateAtEnd
option for the Jest reporter. (Contributed by thomaschaplin and electblake) - Added
marginOfErrorUnder
andstandardDeviationUnder
measurement options. (Contributed by thomaschaplin)
- Added a reporter for Karma and a corresponding example project.
- Adjusted Kelonio so that it can work in the browser (at least in conjunction with something like Browserify).
- Added
kelonio/out/plugin/jestReporterSetup.js
as an alternative to writing your ownjest.setup.js
to callJestReporter.initializeKelonio()
. - Added
Benchmark.events
, an event emitter. - Added
Benchmark.incorporate()
for reporters to add data more easily in response to events. - Moved the compiled reporters from
kelonio/out/*Reporter.js
tokelonio/out/plugin/*Reporter.js
. This allows more easily accommodating export requirements for various frameworks, while still being able to export the classes normally from Kelonio's entry point. - Removed data serialization and
baseDescription
fromBenchmark
since that can now be handled directly in reporters via the new emitter.
- Made
JestReporter.initializeKelonio()
enable data serialization so that you do not have to do that explicitly in yourjest.setup.js
. - Narrowed the type of the
Benchmark.record()
argumentoptions
fromPartial<MeasureOptions>
toPartial<Omit<MeasureOptions, "verify">>
because the function always overridesverify
totrue
.
- Initial release.