source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-macosx/examples/loadspeed.coffee@ 31525

Last change on this file since 31525 was 31525, checked in by ak19, 7 years ago

Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.

File size: 492 bytes
Line 
1page = require('webpage').create()
2system = require 'system'
3
4if system.args.length is 1
5 console.log 'Usage: loadspeed.coffee <some URL>'
6 phantom.exit 1
7else
8 t = Date.now()
9 address = system.args[1]
10 page.open address, (status) ->
11 if status isnt 'success'
12 console.log('FAIL to load the address')
13 else
14 t = Date.now() - t
15 console.log('Page title is ' + page.evaluate( (-> document.title) ))
16 console.log('Loading time ' + t + ' msec')
17 phantom.exit()
18
Note: See TracBrowser for help on using the repository browser.