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

Unified Diff: chrome/test/data/third_party/spaceport/bin/json2csv.js

Issue 10154006: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
Index: chrome/test/data/third_party/spaceport/bin/json2csv.js
diff --git a/chrome/test/data/third_party/spaceport/bin/json2csv.js b/chrome/test/data/third_party/spaceport/bin/json2csv.js
new file mode 100644
index 0000000000000000000000000000000000000000..1c49532b0da383ded2221a54b034282c5928d3fd
--- /dev/null
+++ b/chrome/test/data/third_party/spaceport/bin/json2csv.js
@@ -0,0 +1,20 @@
+var jsBase = __dirname + '/../js';
+var un = require(jsBase + '/unrequire');
+un.require.config({ baseUrl: jsBase });
+
+var input = process.stdin;
+var output = process.stdout;
+
+un.require([ 'fullReport' ], function (fullReport) {
+ var jsonData = '';
+ input.on('data', function (data) {
+ jsonData += data.toString('utf8');
+ });
+
+ input.on('end', function () {
+ var data = JSON.parse(jsonData);
+ var csv = fullReport.csvReport(data.userData.results, data.userData.agentMetadata);
+ output.write(csv);
+ });
+ input.resume();
+});
« no previous file with comments | « chrome/test/data/third_party/spaceport/bin/condense.js ('k') | chrome/test/data/third_party/spaceport/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698