johmanx10/hylianshield — pull request #83 by johmanx10 (2014-02-14 17:07:56+00:00)
Title: Add benchmarking tool

@CyberSecutor @noesnaterse

Output of the initial benchmarks:

```
$ make bench

Benchmarks\Validator\FloatEvent
Method Name Iterations Average Time Ops/second
---------------- ------------ -------------- -------------
defaultValidator: [1,000 ] [0.0000150182247] [66,585.76622]
minLength : [1,000 ] [0.0000232384205] [43,032.18459]
maxLength : [1,000 ] [0.0000233247280] [42,872.95438]
rangeValidator : [1,000 ] [0.0000235962868] [42,379.54936]

Benchmarks\Validator\IntegerEvent
Method Name Iterations Average Time Ops/second
---------------- ------------ -------------- -------------
defaultValidator: [1,000 ] [0.0000145847797] [68,564.62819]
minLength : [1,000 ] [0.0000297551155] [33,607.66654]
maxLength : [1,000 ] [0.0000287899971] [34,734.28623]
rangeValidator : [1,000 ] [0.0000313205719] [31,927.89720]

Benchmarks\Validator\NumberEvent
Method Name Iterations Average Time Ops/second
---------------- ------------ -------------- -------------
defaultValidator: [1,000 ] [0.0000524251461] [19,074.81570]
minLength : [1,000 ] [0.0000721180439] [13,866.15535]
maxLength : [1,000 ] [0.0000716044903] [13,965.60462]
rangeValidator : [1,000 ] [0.0000737757683] [13,554.58606]
```

I chose `make bench` over `make benchmark` as it seems like benchmark is reserved by GNU make. Not sure, but it won´t make when you call it benchmark.