Skip to content

Instantly share code, notes, and snippets.

View axemclion's full-sized avatar

Parashuram N axemclion

View GitHub Profile
@axemclion
axemclion / gist:6357083
Created August 27, 2013 18:18
Calling NPM test from inside a node module
npm = require('npm')
npm.load({
argv: {
remain: [],
cooked: ['test'],
original: ['test']
}
}, function() {
npm.commands.test([], function() {});
});
@axemclion
axemclion / Performance.md
Last active March 7, 2017 23:45
Performance Data using browser-perf for old and new versions of http://www.html5rocks.com
@axemclion
axemclion / article.md
Last active January 4, 2016 12:19
Article for HTML5rocks.com

Automating Web Rendering Performance Measurement

Ensuring that your web pages are delivered to the user as quickly as possible, results in a great user experience. However, users spend more time interacting with the page than waiting for it to download. This makes the smoothness and responsiveness of the site even more critical. Janky page scrolls, disjointed animations or delayed visual cues in a page are just as bad as a site that takes time to load.

Most modern web browsers have tools that can help determine the various performance bottlenecks during typical user interactions. Excellent tutorials have also been written about performance workflows. Despite this, rapid development and deploy cycles make it hard to implement regular performance audits. Tools like [PageSpeed Insights](http://updates.html5rocks.com/201

@axemclion
axemclion / README.md
Last active September 7, 2019 14:41
Angular E2E Tests (Protractor) - Performance Measurement

Protractor and Performance Test

Protractor is the end to end test case runner for AngularJS. These end to end test cases can be repurposed to record performance metrics when the scenario is being run. This is a sample repository with an example of how this can be done.

Usage

Step 0 - Setup

Install all dependencies using npm install

Step 1 - Prepare configuration

@axemclion
axemclion / phpied.md
Last active August 29, 2015 14:02
Article draft for phpied.com

Automating Web Page Rendering Performance Measurements

Real web developers ship; and then start looking for the performance issues that make a web page janky :).

Talking to the readers of this blog about the importance of performance would be like preaching to the choir. Most web developers interested in web performance already use tools like YSlow or Page Speed Insignts to keep an eye out for regressions. However measuring how smooth the page runs after it has been delivered over the network is still pretty hard to measure in an automated way. Tools in the browsers Chrome DevTools timeline or Internet Explorer 11 UI Responsiveness are great in a development environment. I thought that automatig this would be the logical next step and hence I build browser-perf. browser-perf is

@axemclion
axemclion / Readme.md
Last active August 29, 2015 14:03
GPU Composited CSS - Performance

Ariya Hidayat has written an excellent article on GPU Composited CSS and how it can be used to optimize web rendering performance.

The impact of adding CSS transforms is evident in developer timline and this experiment is a way to capture that information using browser-perf. The results from this experiment clearly indicate how certain CSS properties move rendering load to the GPU, and how that that impact the overall responsiveness of the page.

Pre-requisites

  1. Ensure that you have node and npm installed
  2. Ensure that you have Selenium running, or can connect to Sauce Labs
  3. Dowload this gist using git clone https://gist.github.com/853d34ebd776047836f3.git
  4. Install other dependencies using npm install
@axemclion
axemclion / feedly.user.js
Created September 24, 2014 00:52
Feedly - Open Link in Background
// ==UserScript==
// @name Feedly - Open entry in background
// @description Adds 'h' as a hotkey to open selected entry in background tab
// @namespace userscripts.org/users/Lyk
// @author Lyk
// @include http://feedly.com/*
// @include https://feedly.com/*
// @include http://*.feedly.com/*
// @include https://*.feedly.com/*
// @grant GM_openInTab
@axemclion
axemclion / gist:64a0bbdb5d756e8eac3a
Created September 26, 2014 18:01
Test the stability of metrics that browser-perf generates
var browserstack = {
"selenium": "http://hub.browserstack.com:80/wd/hub",
"browsers": [{
'browserName': 'chrome',
'browser_version': 35,
'os': 'OS X',
'platform': 'OS X',
'os_version': 'Mavericks',
"browserstack.debug": false,
/*
@axemclion
axemclion / gist:d41b884cd4fce723647d
Created October 4, 2014 23:53
Capture Chrome timeline for CSS triggers.com
// Remeber to do npm install wd and run a web server where the pages are hosted.
var wd = require('wd');
var path = require('path');
var browser = wd.promiseRemote();
var caps = {
browserName: 'chrome',
loggingPrefs: {