Skip to content

Create a quick way to measure performance#88

Closed
gijsk wants to merge 1 commit into
mozilla:masterfrom
gijsk:create-perf-measurement-start
Closed

Create a quick way to measure performance#88
gijsk wants to merge 1 commit into
mozilla:masterfrom
gijsk:create-perf-measurement-start

Conversation

@gijsk
Copy link
Copy Markdown
Contributor

@gijsk gijsk commented Apr 1, 2015

This is a pretty bare-bones approach, but it spits out two numbers and that seems useful enough as a baseline. @leibovic, @n1k0 - thoughts?

@DavidBruant
Copy link
Copy Markdown
Contributor

2 numbers aren't enough to be meaningful (on my machine, Readerized everything, took 286ms., yes, but for 1 file ? 10 ? 100 ?). At least print out the number of processed HTML files.
With fast-stats, you can very easily get the mean/median/sum of a serie of values.

For high-precision time measurement (not Date.now() specialty), you can use process.hrtime()

@gijsk
Copy link
Copy Markdown
Contributor Author

gijsk commented Apr 1, 2015

The noise is in the 1-2ms ballpark on my machine, so it doesn't seem useful to get more high-precision measures.

My usecase is "how much does patch X slow this down", for which the current state is fine.

I selected the "real" articles from our existing testcases, so I don't think mean/median is useful as they are different files.

@gijsk gijsk force-pushed the create-perf-measurement-start branch 2 times, most recently from 71eaed8 to f544b69 Compare April 1, 2015 19:28
@gijsk
Copy link
Copy Markdown
Contributor Author

gijsk commented Apr 1, 2015

The process.hrtime() doesn't seem to improve noise levels much for me, but perhaps on slower machines it'll help, so let's go with that.

@gijsk gijsk force-pushed the create-perf-measurement-start branch from f544b69 to a38f88a Compare April 1, 2015 19:35
@gijsk
Copy link
Copy Markdown
Contributor Author

gijsk commented Apr 1, 2015

Closing in favour of #90 .

@gijsk gijsk closed this Apr 1, 2015
@gijsk gijsk deleted the create-perf-measurement-start branch April 1, 2015 20:02
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.

2 participants