We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce3498e commit 6648751Copy full SHA for 6648751
client/client.js
@@ -271,13 +271,13 @@ client.reduxMiddleware = (store) => (next) => (action) => {
271
return result
272
}
273
274
-client.measure = (title) => {
275
- const times = []
276
- const step = () => times.push(performanceNow())
277
- step()
278
- const stop = () => {
279
280
- client.log({title, times})
+client.bench = (title) => {
+ const steps = []
+ const step = (stepTitle) => steps.push({title: stepTitle, time: performanceNow()})
+ step(title)
+ const stop = (stopTitle) => {
+ step(stopTitle)
+ client.sendCommand('bench.report', {title, steps})
281
282
return {step, stop}
283
0 commit comments