Speedracer Versions Save

Collect performance metrics for your library/application.

v0.2.0

6 years ago

This release brings a lot of new stuff and fixes some critical bugs.

New commands

Introducing speedracer run and speedracer display. See below for more details.

Introducing races

Speed Racer aims to answer different needs. But one of the main objective is performance testing and the ability to run automatic performance regression tests. The first step to this feature is to be able to trace specific chunks of code like a unit test would do.

In Speed Racer's realm such a test is called a race. You can have multiple races per file, they are run serially.

A race can be declared like this:

import race from 'speedracer'

race('sync race', () => {
  syncStuff()
})

race('async race', () => {
  return new Promise(/* ... */)
})

You can run races like this: speedracer run file.js or simply speedracer file.js. By default Speed Racer will record every races in every JavaScript file found in the perf directory.

Each race gets its associated trace and report after a run. By default, both are saved in .speedracer directory. These two artifacts can then be analyzed for different purposes.

New reporter

You may have a bunch of races. Displaying a detailed report for each one of them during the run does not make so much sense. I'm introducing a compact reporter that only gives live informations about the run itself. It looks like this:

speedracer-release

I'll eventually open the api for custom reporters.

Report command

The 0.1.x behavior still exist behind the display command. After a run, you can quickly display their associated reports like this: speedracer display. By default Speed Racer will show all reports in .speedracer directory.

Breaking changes

  • Races api: c914752add0907fd0ba489590128705112b9693e
  • Change report structure: e8a403e2d4b647dc07ee0043a720e3bcec1da7c3
  • Replace --duration flag with timeout: c914752add0907fd0ba489590128705112b9693e
  • Remove --traces and --reports flags: 987d16800f8c5c97bb150a833690f3e75d476aa5

Miscellaneous

  • Save traces and reports by default: 987d16800f8c5c97bb150a833690f3e75d476aa5
  • Add --no-trace and --no-reports flags: e4459411aa65b730d4d6c33a5b9e4a745fc5ac52
  • Add --chrome-flags flag: ff9050b9e0d7e6ba7080b06f163bb6f61418e48b
  • Add --no-headless flag: 71d124b4ca3df087731ee3f2a62c9aff59c4b2e2
  • Add verbose output using DEBUG=*: c914752add0907fd0ba489590128705112b9693e