vojtajina/testacular — pull request #187 by Dignifiedquire (2012-11-25 12:25:11+00:00)
Title: [feature] Add benchmark task.

Using grunt-benchmark one can now benchmark the complete testsuite as discussed in #129
Three tasks are available

* `grunt benchmark:unit`
* `grunt benchmark:client`
* `grunt benchmark:e2e`

which respectively benchmark the tests.
Running `grunt benchmark` runs all the benchmarks. Right now I've set the repeat option to 1 but that is just because the e2e tests take such a long time. I would suggest that for every major change to the code base the benchmarks should be run before and afterwards and that they should be included in pull requests so we can see the performance consequences are immediately visible.

Right now I get the following values:
```bash
Running "benchmark:unit" (benchmark) task
Benchmarking "unit tests" [benchmarks/unit.js] x1...
>> 3890 ms per iteration

Running "benchmark:client" (benchmark) task
Benchmarking "client tests" [benchmarks/client.js] x1...
>> 3580 ms per iteration

Running "benchmark:e2e" (benchmark) task
Benchmarking "e2e tests" [benchmarks/e2e.js] x1...
>> 21723 ms per iteration
```