Skip to content

Instantly share code, notes, and snippets.

David Parker boldfacedesign

View GitHub Profile
@boldfacedesign
boldfacedesign / imports_timing.js
Last active Aug 29, 2015 — forked from ebidel/imports_timing.js
HTML Imports Resource Timing performance
View imports_timing.js
// Know how fast your HTML Imports are
var imports = document.querySelectorAll('link[rel="import"]');
[].forEach.call(imports, function(link) {
var entries = performance.getEntriesByName(link.href);
console.info('=== HTML Imports perf ===');
entries.forEach(function(e) {
console.log(e.name, 'took', e.duration, 'ms');
});
});
View watch.rb
#!/usr/bin/env ruby
require 'tempfile'
require 'fileutils'
# Signals
trap("SIGINT") { exit }
# Setup
TARGET_FOLDER = ARGV[0]
TARGET_URL = ARGV[1]
You can’t perform that action at this time.