summaryrefslogtreecommitdiff
path: root/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html')
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html b/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html
new file mode 100644
index 00000000000..9e64041f3e3
--- /dev/null
+++ b/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!--
+Copyright 2015 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<link rel="import" href="/tracing/mre/failure.html">
+
+<script>
+'use strict';
+
+tr.exportTo('tr.mre', function() {
+ function reduceMapResults(jobResults, key, mapResults, reduceFunction) {
+ try {
+ const result = reduceFunction(key, mapResults);
+ jobResults.addPair(key, result);
+ } catch (ex) {
+ ex.name = 'ReduceFunctionError';
+ throw ex;
+ }
+ }
+
+ return {
+ reduceMapResults
+ };
+});
+</script>