grunt js for the enterprise vol.1: frontend performance with phantomas

27
Grunt.js for the Enterprise Vol. 1 Phantomas: Performance Monitoring

Upload: david-amend

Post on 10-May-2015

693 views

Category:

Software


0 download

DESCRIPTION

Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas. This is the first presentation of an upcoming series to achieve a proper Continous Integration process for big JavaScript projects, memory leaks javascript, David Amend

TRANSCRIPT

Page 1: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Grunt.js for the EnterpriseVol. 1

Phantomas: Performance Monitoring

Page 2: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

David Amend● Java Web-Developer, Frontend Architecture● Backbone, Ember, Angular, Grunt.js

Interests: JavaScript, TypeScript, Triathlon-Sports

About

[email protected]

Page 3: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
Page 4: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Grunt.js

Build tool like: Rake, ant, maven, groovy, yeoman, …

Runs as npmEasy JSON-SyntaxSupports in Continous Integration

Page 5: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Frontend-Performance Monitoring

Page 6: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

WTF Phantomas?

Page 7: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Ready for Continous Integration

Page 8: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

History Comparison

Page 9: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Knownledge About Every Step !

Page 10: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
Page 11: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

JavaScript VM

Node

Phantom.js

Phantomas

Grunt-Phantomas

Phantomas-Grunt

Navigation Timing API

D3 ChartsHTML-Page

Page 12: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Focus Frontend Only→ No latency

Page 13: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

PerformanceReports

JSONCSV

TAP

StatsDElasticSearch

Export Formats

Page 14: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Runs Everywhere

JavaScriptVM Headless-Phantom

=

Page 15: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Easy Setup phantomas: {

gruntSite : {

options : {

indexPath : './phantomas/',

options : {},

url : 'http://gruntjs.com/',

buildUi : true

}

}

}

Page 16: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Phantomas: Metrics

● Requests monitor

● Assets types

● DOM complexity

● Event listeners

● Window performance

● jQuery/Angular bound events, analyse-css

● ...

Page 17: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Scriptable Metrics

if (typeof window.__phantomas !== 'undefined') { (function(phantomas) { phantomas.setMarkerMetric('actionFooBar'); })(window.__phantomas);}

Page 18: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Custom Metrics / Assertions

Some Parameters:

--wait-for-selector=[CSS selector] --post-load-delay=[seconds]--proxy=[host:port]--phone viewport--runs 5

Phantomas-Juve: Simple Node Assertions

Grunt-devperf: Overview & Warnings

Page 19: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Grunt-Devperf: HTML-Page

Page 20: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

D3 Tables

Page 21: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
Page 22: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Additional Information

Page 23: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Additional Information

Page 24: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Filmstrips

Page 25: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Summary

● One and only tool available● Navigation API not always trustable?!● Some buggy Charts● Usage of Navigation API Specification● E2E-Testing pluggable● Easy to setup● Wishlist is high

Page 26: Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas

Questions ?