Skip to content

Commit

Permalink
Add SKIP in bisect.sh and use radar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 10, 2013
1 parent 96d4e5b commit 0fb38f3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
14 changes: 13 additions & 1 deletion bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/\.')
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<script src="Chart.min.js"></script>
<canvas id="myChart" width="400" height="400"></canvas>
<canvas id="myChart" width="800" height="600"></canvas>
<script src="data.js"></script>
<script src="index.js"></script>
</html>
3 changes: 2 additions & 1 deletion www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
11 changes: 5 additions & 6 deletions www/make-data.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs')

const input = "./stats.csv"
const input = "../stats.csv"
const output = "data.js"

var data = {
Expand Down Expand Up @@ -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");
});

0 comments on commit 0fb38f3

Please sign in to comment.