Skip to content

Instantly share code, notes, and snippets.

@mattbasta
Created May 5, 2014 01:16
Show Gist options
  • Save mattbasta/54c769e8c2e0fe0f9a8f to your computer and use it in GitHub Desktop.
Save mattbasta/54c769e8c2e0fe0f9a8f to your computer and use it in GitHub Desktop.
Snippet for formatting timing information
Object.keys(Timing.files).forEach(function(file) {
console.log(file + Array(100 - file.length).join('-'));
var markers = Timing.markers[file];
markers.forEach(function(marker, i) {
console.log(
marker.name +
Array(100 - marker.name.length).join(' ') +
(i !== markers.length - 1 ?
markers[i + 1].start - marker.start :
0)
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment