From 0fb38f304a28f03bd8fe98d0230e28e1d39d9932 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 10 Oct 2013 03:14:58 +0200 Subject: [PATCH] Add SKIP in bisect.sh and use radar chart --- bisect.sh | 14 +++++++++++++- www/index.html | 2 +- www/index.js | 3 ++- www/make-data.js | 11 +++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/bisect.sh b/bisect.sh index 6f2ff135..701cf52d 100755 --- a/bisect.sh +++ b/bisect.sh @@ -6,7 +6,8 @@ if [ -z "$1" ]; then exit 1 fi TESTS=$@ -UPTO=32 +SKIP=0 +UPTO=128 if [ "${TESTS}" = "-a" ]; then TESTS_ALL=1 TESTS=$(find t -type f| grep -v '/\.') @@ -27,6 +28,17 @@ git clone .. radare2 cd radare2 echo "* Running bisect on ${TESTS}" REVS=$(git log|grep ^commit |awk '{print $2}') +if [ ${SKIP} -gt 0 ]; then + REV="" + for a in ${REVS} ; do + if [ ${SKIP} -gt 0 ]; then + SKIP=$(($SKIP-1)) + else + REV="$REV $a" + fi + done + REVS="${REV}" +fi for a in ${REVS}; do [ "${UPTO}" = 0 ] && break UPTO=$(($UPTO-1)) diff --git a/www/index.html b/www/index.html index fff8d018..8a49ee0a 100644 --- a/www/index.html +++ b/www/index.html @@ -1,6 +1,6 @@ - + diff --git a/www/index.js b/www/index.js index 99d73055..0e6b3f5b 100644 --- a/www/index.js +++ b/www/index.js @@ -51,4 +51,5 @@ var options = { onAnimationComplete : null } -new Chart(ctx).Line(data,options); +//new Chart(ctx).Line(data,options); +new Chart(ctx).Radar(data,options); diff --git a/www/make-data.js b/www/make-data.js index 43f2bca6..a76a7ff7 100644 --- a/www/make-data.js +++ b/www/make-data.js @@ -1,6 +1,6 @@ var fs = require('fs') -const input = "./stats.csv" +const input = "../stats.csv" const output = "data.js" var data = { @@ -43,18 +43,17 @@ fs.readFile (input, function (err,txt) { process.exit(1); } var rows = (""+txt).split(/\n/); - data.labels = new Array(); - for (var i = 0;i<4; i++) - data.datasets[i].data = new Array(); for (var i in rows) { var cols = rows[i].split(/,/); if (cols.length>4) { - data.labels.push (cols[0]); + var label = cols[0].split(/-/)[1]; + data.labels.push (label); data.datasets[0].data.push (cols[1]); data.datasets[1].data.push (cols[2]); data.datasets[2].data.push (cols[3]); data.datasets[3].data.push (cols[4]); } } - fs.writeFileSync (output, "const data = "+JSON.stringify(data)+"\n"); + fs.writeFileSync (output, "const data = "+ + JSON.stringify (data)+"\n"); });