Created
December 1, 2017 18:05
-
-
Save bgrins/ba5cfda83a77397cd10d33de808052bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://treeherder.mozilla.org/#/jobs?repo=try&revision=aaccf2c1ff6b66b52bcfa1390b78bb781b86f672&filter-tier=1&filter-tier=2&filter-tier=3&selectedJob=148874008 | |
var fs = require("fs"); | |
var bsplit = require('buffer-split'); | |
function readLines(path) { | |
const buf = fs.readFileSync(path); // omitting encoding returns a Buffer | |
const delim = Buffer.from('\n'); | |
const result = bsplit(buf, delim); | |
return result | |
.filter(x => x.toString().indexOf("SetBoundElement") > -1) | |
.map(x => x.toString().match(/SetBoundElement Called (.+)/)[1]); | |
} | |
var lines = readLines('live_backing.log'); | |
var obj = {} | |
for (var line of lines) { | |
obj[line] = obj[line] ? obj[line] + 1 : 1; | |
} | |
console.log(obj); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment