Created
May 14, 2012 14:55
-
-
Save ryanhanks/2694426 to your computer and use it in GitHub Desktop.
Benchmarking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FactoryMonitor.benchmarks = [] | |
FactoryMonitor.stack = [] | |
def run_with_monitor | |
self.class.stack.push self.class.benchmarks | |
self.class.benchmarks = child_results = [] | |
results = Benchmark.get | |
self.class.benchmarks = self.class.stack.pop | |
self.class.benchmarks << [factory_name, results, child_results] | |
end | |
[ | |
[:fidelity_bond, results1, []], | |
[:bid_bond, results2, [ | |
[:user, results3, []], | |
[:agency, results4, []] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment