Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add io.js v1.x #1

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

Runs {io,node}.js benchmarks and generates pretty graphs

[![assets/linux-net.png](assets/linux-net.png)](https://thlorenz.github.io/benchgraph#linux-net)

## Notes on Benchmarks

The benchmarks were copied from the io.js repo (v2.0.1).
The benchmarks were copied from the io.js repo (v2.0.1) and slightly adapted.

Some of them don't run with `node-v0.10` or even `node-v0.12`. When only `0.10` failed the data was included, but the
graph only compares io.js and node-v0.12 obviously.
Expand Down
Binary file added assets/linux-net.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions benchgraph
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export NODE=`nave use 0.12 which node`
export BENCHMARK_NAME=$1-node
$DIR/graph.sh $NODE $DIR/benchmark/common.js $1

# io.js v1
export NODE=`nave use 1.8 which node`
export BENCHMARK_NAME=$1-iojs
$DIR/graph.sh node $DIR/benchmark/common.js $1

# io.js latest
export NODE=`nave use latest which node`
export BENCHMARK_NAME=$1-iojs
Expand Down
5 changes: 5 additions & 0 deletions buffers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export NODE=`nave use 0.12 which node`
export BENCHMARK_NAME=buffer-node
$DIR/graph.sh $NODE $DIR/benchmark/common.js buffers

# io.js v1
export NODE=`nave use 1.8 which node`
export BENCHMARK_NAME=buffer-iojs
$DIR/graph.sh node $DIR/benchmark/common.js buffers

# io.js latest
export NODE=`nave use latest which node`
export BENCHMARK_NAME=buffer-iojs
Expand Down
7 changes: 3 additions & 4 deletions client/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,22 @@ section#body {

/* content and sidebar */
section#content {
margin-left: 250px;
padding: 20px;
background-color: #fff;
top: 0;
bottom: 0;
width: 77%;
}
.column-left {
left:0;
}
.column-right {
margin-left: 250px;
right: 0;
float: right;
}
aside#sidebar {
width:250px;
position: fixed;
width:20%;
position: absolute;
background: #80B763;
}
nav#mainnav ul {
Expand Down
2 changes: 1 addition & 1 deletion client/js/bundle.js

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions client/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ var oss = [
]
var versions = [
'iojs-v2.0.1'
, 'node-v0.10.38'
, 'node-v0.12.3'
, 'node-v0.10.38'
]

var osTitle = {
Expand All @@ -38,7 +38,7 @@ function urlsFor(os, topic) {
}

function byVersion(a, b) {
return a._version > b._version
return a._sortIdx - b._sortIdx;
}

function getData(os, topic, cb) {
Expand All @@ -52,6 +52,7 @@ function getData(os, topic, cb) {
if (err) { abort = true; return cb(err) }
var obj = JSON.parse(body);
obj._version = versions[idx];
obj._sortIdx = idx;
data.push(obj);
if (!--tasks) cb(null, data.sort(byVersion));
}
Expand Down Expand Up @@ -123,6 +124,14 @@ function showPane(os, topic) {
panesPerOs[os][topic]();
}

function changeLocation(os, topic) {
// do so without scrolling window
var x = window.pageXOffset
, y = window.pageYOffset
document.location.hash = osTitle[os] + '-' + topic;
window.scrollTo(x, y)
}

function selectLink(link) {
var li = link.parentElement
, os = link.dataset.os
Expand All @@ -131,11 +140,14 @@ function selectLink(link) {
if (currentList) currentList.classList.remove('selected-item');
li.classList.add('selected-item')
currentList = li;
changeLocation(os, topic)
showPane(os, topic)
}

function onmainnavClick(e) {
selectLink(e.target)
// changing location manually to avoid window scrolling
e.preventDefault()
}

var mainnavEl = document.getElementById('mainnav')
Expand Down
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ <h3>OSX</h3><p><em>darwin_14.3.0_x86_64</em></p>
</section>

<div class="clear"></div>
<a href="https://github.com/thlorenz/benchgraph">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png">
</a>
<script type="text/javascript" src="client/js/bundle.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-32151587-14', 'auto');
ga('send', 'pageview');

</script>
</body>
</html>