add liveprogramming as load test

This commit is contained in:
notmasteryet 2012-01-09 20:37:39 -06:00
parent 982ea98c44
commit 00664f5f0c
3 changed files with 19 additions and 2 deletions

View File

@ -78,6 +78,14 @@ function cleanup() {
}
}
function exceptionToString(e) {
if (typeof e !== 'object')
return String(e);
if (!('message' in e))
return JSON.stringify(e);
return e.message + ('stack' in e ? ' at ' + e.stack.split('\n')[0] : '');
}
function nextTask() {
cleanup();
@ -95,7 +103,7 @@ function nextTask() {
try {
task.pdfDoc = new PDFJS.PDFDoc(data);
} catch (e) {
failure = 'load PDF doc : ' + e.toString();
failure = 'load PDF doc : ' + exceptionToString(e);
}
task.pageNum = task.firstPage || 1;
nextPage(task, failure);
@ -185,7 +193,7 @@ function nextPage(task, loadError) {
textLayerBuilder
);
} catch (e) {
failure = 'page setup : ' + e.toString();
failure = 'page setup : ' + exceptionToString(e);
}
}

View File

@ -0,0 +1 @@
http://blog.lassus.se/files/liveprogramming.pdf

View File

@ -395,5 +395,13 @@
"rounds": 1,
"link": true,
"type": "eq"
},
{ "id": "liveprogramming",
"file": "pdfs/liveprogramming.pdf",
"md5": "7bd4dad1188232ef597d36fd72c33e52",
"rounds": 1,
"pageLimit": 3,
"link": true,
"type": "load"
}
]