update benchmark page

This commit is contained in:
c9s 2014-05-16 21:43:54 +08:00
parent 9c53003871
commit 6c5210c06e
2 changed files with 350 additions and 4 deletions

View file

@ -7,10 +7,11 @@
<script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/data.js"></script> <script src="http://code.highcharts.com/modules/data.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script> <script>
$.get('tests/bench_str.csv', function(data) { $.get('tests/bench_str.csv', function(data) {
$('#container').highcharts({ $('#chart').highcharts({
data: { data: {
csv: data, csv: data,
parseDate: function (s) { parseDate: function (s) {
@ -118,8 +119,352 @@
</script> </script>
</head> </head>
<body> <body>
<div class="container">
<h1>R3: Router Benchmark</h1>
<div id="chart" style="width: 800px; height: 400px; margin: 0 auto"></div>
<h2>Data Set</h2>
<pre>/foo/bar/baz
/foo/bar/qux
/foo/bar/quux
/foo/bar/corge
/foo/bar/grault
/foo/bar/garply
/foo/baz/bar
/foo/baz/qux
/foo/baz/quux
/foo/baz/corge
/foo/baz/grault
/foo/baz/garply
/foo/qux/bar
/foo/qux/baz
/foo/qux/quux
/foo/qux/corge
/foo/qux/grault
/foo/qux/garply
/foo/quux/bar
/foo/quux/baz
/foo/quux/qux
/foo/quux/corge
/foo/quux/grault
/foo/quux/garply
/foo/corge/bar
/foo/corge/baz
/foo/corge/qux
/foo/corge/quux
/foo/corge/grault
/foo/corge/garply
/foo/grault/bar
/foo/grault/baz
/foo/grault/qux
/foo/grault/quux
/foo/grault/corge
/foo/grault/garply
/foo/garply/bar
/foo/garply/baz
/foo/garply/qux
/foo/garply/quux
/foo/garply/corge
/foo/garply/grault
/bar/foo/baz
/bar/foo/qux
/bar/foo/quux
/bar/foo/corge
/bar/foo/grault
/bar/foo/garply
/bar/baz/foo
/bar/baz/qux
/bar/baz/quux
/bar/baz/corge
/bar/baz/grault
/bar/baz/garply
/bar/qux/foo
/bar/qux/baz
/bar/qux/quux
/bar/qux/corge
/bar/qux/grault
/bar/qux/garply
/bar/quux/foo
/bar/quux/baz
/bar/quux/qux
/bar/quux/corge
/bar/quux/grault
/bar/quux/garply
/bar/corge/foo
/bar/corge/baz
/bar/corge/qux
/bar/corge/quux
/bar/corge/grault
/bar/corge/garply
/bar/grault/foo
/bar/grault/baz
/bar/grault/qux
/bar/grault/quux
/bar/grault/corge
/bar/grault/garply
/bar/garply/foo
/bar/garply/baz
/bar/garply/qux
/bar/garply/quux
/bar/garply/corge
/bar/garply/grault
/baz/foo/bar
/baz/foo/qux
/baz/foo/quux
/baz/foo/corge
/baz/foo/grault
/baz/foo/garply
/baz/bar/foo
/baz/bar/qux
/baz/bar/quux
/baz/bar/corge
/baz/bar/grault
/baz/bar/garply
/baz/qux/foo
/baz/qux/bar
/baz/qux/quux
/baz/qux/corge
/baz/qux/grault
/baz/qux/garply
/baz/quux/foo
/baz/quux/bar
/baz/quux/qux
/baz/quux/corge
/baz/quux/grault
/baz/quux/garply
/baz/corge/foo
/baz/corge/bar
/baz/corge/qux
/baz/corge/quux
/baz/corge/grault
/baz/corge/garply
/baz/grault/foo
/baz/grault/bar
/baz/grault/qux
/baz/grault/quux
/baz/grault/corge
/baz/grault/garply
/baz/garply/foo
/baz/garply/bar
/baz/garply/qux
/baz/garply/quux
/baz/garply/corge
/baz/garply/grault
/qux/foo/bar
/qux/foo/baz
/qux/foo/quux
/qux/foo/corge
/qux/foo/grault
/qux/foo/garply
/qux/bar/foo
/qux/bar/baz
/qux/bar/quux
/qux/bar/corge
/qux/bar/grault
/qux/bar/garply
/qux/baz/foo
/qux/baz/bar
/qux/baz/quux
/qux/baz/corge
/qux/baz/grault
/qux/baz/garply
/qux/quux/foo
/qux/quux/bar
/qux/quux/baz
/qux/quux/corge
/qux/quux/grault
/qux/quux/garply
/qux/corge/foo
/qux/corge/bar
/qux/corge/baz
/qux/corge/quux
/qux/corge/grault
/qux/corge/garply
/qux/grault/foo
/qux/grault/bar
/qux/grault/baz
/qux/grault/quux
/qux/grault/corge
/qux/grault/garply
/qux/garply/foo
/qux/garply/bar
/qux/garply/baz
/qux/garply/quux
/qux/garply/corge
/qux/garply/grault
/quux/foo/bar
/quux/foo/baz
/quux/foo/qux
/quux/foo/corge
/quux/foo/grault
/quux/foo/garply
/quux/bar/foo
/quux/bar/baz
/quux/bar/qux
/quux/bar/corge
/quux/bar/grault
/quux/bar/garply
/quux/baz/foo
/quux/baz/bar
/quux/baz/qux
/quux/baz/corge
/quux/baz/grault
/quux/baz/garply
/quux/qux/foo
/quux/qux/bar
/quux/qux/baz
/quux/qux/corge
/quux/qux/grault
/quux/qux/garply
/quux/corge/foo
/quux/corge/bar
/quux/corge/baz
/quux/corge/qux
/quux/corge/grault
/quux/corge/garply
/quux/grault/foo
/quux/grault/bar
/quux/grault/baz
/quux/grault/qux
/quux/grault/corge
/quux/grault/garply
/quux/garply/foo
/quux/garply/bar
/quux/garply/baz
/quux/garply/qux
/quux/garply/corge
/quux/garply/grault
/corge/foo/bar
/corge/foo/baz
/corge/foo/qux
/corge/foo/quux
/corge/foo/grault
/corge/foo/garply
/corge/bar/foo
/corge/bar/baz
/corge/bar/qux
/corge/bar/quux
/corge/bar/grault
/corge/bar/garply
/corge/baz/foo
/corge/baz/bar
/corge/baz/qux
/corge/baz/quux
/corge/baz/grault
/corge/baz/garply
/corge/qux/foo
/corge/qux/bar
/corge/qux/baz
/corge/qux/quux
/corge/qux/grault
/corge/qux/garply
/corge/quux/foo
/corge/quux/bar
/corge/quux/baz
/corge/quux/qux
/corge/quux/grault
/corge/quux/garply
/corge/grault/foo
/corge/grault/bar
/corge/grault/baz
/corge/grault/qux
/corge/grault/quux
/corge/grault/garply
/corge/garply/foo
/corge/garply/bar
/corge/garply/baz
/corge/garply/qux
/corge/garply/quux
/corge/garply/grault
/grault/foo/bar
/grault/foo/baz
/grault/foo/qux
/grault/foo/quux
/grault/foo/corge
/grault/foo/garply
/grault/bar/foo
/grault/bar/baz
/grault/bar/qux
/grault/bar/quux
/grault/bar/corge
/grault/bar/garply
/grault/baz/foo
/grault/baz/bar
/grault/baz/qux
/grault/baz/quux
/grault/baz/corge
/grault/baz/garply
/grault/qux/foo
/grault/qux/bar
/grault/qux/baz
/grault/qux/quux
/grault/qux/corge
/grault/qux/garply
/grault/quux/foo
/grault/quux/bar
/grault/quux/baz
/grault/quux/qux
/grault/quux/corge
/grault/quux/garply
/grault/corge/foo
/grault/corge/bar
/grault/corge/baz
/grault/corge/qux
/grault/corge/quux
/grault/corge/garply
/grault/garply/foo
/grault/garply/bar
/grault/garply/baz
/grault/garply/qux
/grault/garply/quux
/grault/garply/corge
/garply/foo/bar
/garply/foo/baz
/garply/foo/qux
/garply/foo/quux
/garply/foo/corge
/garply/foo/grault
/garply/bar/foo
/garply/bar/baz
/garply/bar/qux
/garply/bar/quux
/garply/bar/corge
/garply/bar/grault
/garply/baz/foo
/garply/baz/bar
/garply/baz/qux
/garply/baz/quux
/garply/baz/corge
/garply/baz/grault
/garply/qux/foo
/garply/qux/bar
/garply/qux/baz
/garply/qux/quux
/garply/qux/corge
/garply/qux/grault
/garply/quux/foo
/garply/quux/bar
/garply/quux/baz
/garply/quux/qux
/garply/quux/corge
/garply/quux/grault
/garply/corge/foo
/garply/corge/bar
/garply/corge/baz
/garply/corge/qux
/garply/corge/quux
/garply/corge/grault
/garply/grault/foo
/garply/grault/bar
/garply/grault/baz
/garply/grault/qux
/garply/grault/quux
/garply/grault/corge
</pre>
</div>
<div id="container" style="width: 800px; height: 400px; margin: 0 auto"></div>
</body> </body>
</html> </html>

View file

@ -2,5 +2,6 @@
arr = ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"] arr = ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"]
paths = arr.permutation(3).map { |a| "/#{a.join '/'}" } paths = arr.permutation(3).map { |a| "/#{a.join '/'}" }
paths.each do |path| paths.each do |path|
puts "r3_tree_insert_path(n, \"#{path}\", NULL);" # puts "r3_tree_insert_path(n, \"#{path}\", NULL);"
puts path
end end