aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/vendor/benchmarkjs-runner/example.html
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-09-10 14:22:26 +1200
committerAldo Cortesi <aldo@nullcube.com>2014-09-10 14:23:10 +1200
commit0510c9b111aed03d0d3680db63614d50f231745c (patch)
tree0d2fec5d46a3cb984a8b12e36db2f44a1a8eaa5a /web/src/vendor/benchmarkjs-runner/example.html
parent76982937a68a2adaf96ec2d258e369d7c871a609 (diff)
downloadmitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.tar.gz
mitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.tar.bz2
mitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.zip
Client-side framework for web application
Diffstat (limited to 'web/src/vendor/benchmarkjs-runner/example.html')
-rw-r--r--web/src/vendor/benchmarkjs-runner/example.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/web/src/vendor/benchmarkjs-runner/example.html b/web/src/vendor/benchmarkjs-runner/example.html
new file mode 100644
index 00000000..72c87d3e
--- /dev/null
+++ b/web/src/vendor/benchmarkjs-runner/example.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<meta charset='utf-8' />
+<title>Benchmarks</title>
+<script src='runner.js'></script>
+<script>
+suite("String matching", function() {
+ bench("String#match", function() {
+ !! "Hello world".match(/o/);
+ });
+
+ bench("String#indexOf", function() {
+ "Hello world".indexOf('o') > -1;
+ });
+
+ bench("RegExp#test", function() {
+ !! /o/.test("Hello world");
+ });
+
+ before(function() {
+ // Things to execute before all benchmarks in the suite.
+ // Does not count into a benchmark's elapsed time.
+ });
+
+ afterEach(function() {
+ // Things to execute after each benchmark cycle.
+ // Does not count into a benchmark's elapsed time.
+ });
+});
+
+/*
+// Advanced examples
+// ----------------------------------------------------------------------------
+
+// You can specify Benchmark.js options in suite() and bench().
+suite("My suite", { maxTime: 10 }, function() {
+
+ bench("My benchmark", function() {
+ }, {
+ onCycle: ...
+ });
+
+});
+*/
+</script>