Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Unified Diff: benchmarks/base.js

Issue 8053: Improve error reporting in benchmarks. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | benchmarks/run.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: benchmarks/base.js
===================================================================
--- benchmarks/base.js (revision 549)
+++ benchmarks/base.js (working copy)
@@ -169,6 +169,17 @@
}
+// Notifies the runner that running a benchmark resulted in an error.
+BenchmarkSuite.prototype.NotifyError = function(error) {
+ if (this.runner.NotifyError) {
+ this.runner.NotifyError(this.name, error);
+ }
+ if (this.runner.NotifyStep) {
+ this.runner.NotifyStep(this.name);
+ }
+}
+
+
// Runs a single benchmark for at least a second and computes the
// average time it takes to run a single iteration.
BenchmarkSuite.prototype.RunSingle = function(benchmark) {
@@ -195,7 +206,12 @@
var suite = this;
function RunNext() {
if (index < length) {
- suite.RunSingle(suite.benchmarks[index++]);
+ try {
+ suite.RunSingle(suite.benchmarks[index++]);
+ } catch (e) {
+ suite.NotifyError(e);
+ return null;
+ }
return RunNext;
}
suite.NotifyResult();
« no previous file with comments | « no previous file | benchmarks/run.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698