add liveprogramming as load test
This commit is contained in:
parent
982ea98c44
commit
00664f5f0c
@ -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() {
|
function nextTask() {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
@ -95,7 +103,7 @@ function nextTask() {
|
|||||||
try {
|
try {
|
||||||
task.pdfDoc = new PDFJS.PDFDoc(data);
|
task.pdfDoc = new PDFJS.PDFDoc(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
failure = 'load PDF doc : ' + e.toString();
|
failure = 'load PDF doc : ' + exceptionToString(e);
|
||||||
}
|
}
|
||||||
task.pageNum = task.firstPage || 1;
|
task.pageNum = task.firstPage || 1;
|
||||||
nextPage(task, failure);
|
nextPage(task, failure);
|
||||||
@ -185,7 +193,7 @@ function nextPage(task, loadError) {
|
|||||||
textLayerBuilder
|
textLayerBuilder
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
failure = 'page setup : ' + e.toString();
|
failure = 'page setup : ' + exceptionToString(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
test/pdfs/liveprogramming.pdf.link
Normal file
1
test/pdfs/liveprogramming.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://blog.lassus.se/files/liveprogramming.pdf
|
@ -395,5 +395,13 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"link": true,
|
"link": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{ "id": "liveprogramming",
|
||||||
|
"file": "pdfs/liveprogramming.pdf",
|
||||||
|
"md5": "7bd4dad1188232ef597d36fd72c33e52",
|
||||||
|
"rounds": 1,
|
||||||
|
"pageLimit": 3,
|
||||||
|
"link": true,
|
||||||
|
"type": "load"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user