Skip to content

agent001/mobster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Mobster is a tool that can help you get deeper understanding into the performance of mobile web applications on real mobile devices

Mobster is built off of the WebKit framework and leverages real devices to extract data that can help you to measure and improve your mobile performance. Below are key features of Mobster

Highlights :

  • Non-intrusive performance profiling of mobile web apps
  • Automatically detect regressions in page performance and memory usage
  • Insights into native browser events
  • Continuous integration with release process

Mobster provides a simple way for developers to record crucial web performance data on mobile devices while running automated flows. Using Mobster, developers can test the performance of their site on a variety of devices and easily detect any performance regressions. You can gather following metrics from real devices using Mobster.

  • Page timings,network resource sizes and timings
  • Internal browser / DOM events like GC, paints, and CSS recalculates
  • HTTP waterfalls
  • Memory Utilization

Contribution

Mobster is a new project, and we are interested in building the community; we would welcome any thoughts or [patches](URL to be added). You can reach us on the Apache mailing lists.

The Mobster code is available from git mirror:

Getting Started

key components -

  • WebKit Communicator - Handles low-level sending and receiving of messages. Provides a way to specify callbacks
  • Remote WebKit Client - Uses WebKitCommunicator to provide an API for sending commands to the browser and querying for data (e.g. tell the browser to navigate to a URL, get CSS profiling results)
  • FlowProfiler - Interprets the flow file specified by the user and uses WebKitClient's API to perform the actions from the flow, while recording the results

Using Mobster to measure performance of web applications on Android Device

Prerequisites -

  • If you want to use Mobster to measure performance of web applications on a physical android device , you need to install Android SDK version 4.0 or later on your host. You can download SDK here
  • Download and install Python 2.6.6+ (but not Python 3) .
  • You should download and install PIP, you can find instructions to download and install PIP here
  1. Check out mobster code ( using git clone command)

  2. Install the packages listed in requirements.txt

cd mobster pip install -r requirements.txt

  1. Open Chrome on your device. If using desktop Chrome, start it with remote debugging enabled and remote debugging port set to 9222, e.g. (for Mac OS):
 open -a "Google Chrome" --args --remote-debugging-port=9222 --enable-memory-info 

To test if the remote debugging is working try this on your chrome browser - http://localhost:9222

  1. Connecting Mobster to Android device
  • Connect the device to your computer via USB
  • Enable USB debugging on the device in settings -> Developer Options -> USB Debugging ( Please refer to your device manuals for details )
  • Open Chrome browser in the device and enable USB debugging in Settings -> Advanced -> Developer Tools -> Enable USB Web debugging
  • Execute the command below under the Android SDK folder : .//platform-tools/adb forward tcp:9222 localabstract:chrome_devtools_remote
  1. Open Chrome on the device

  2. Run the main Mobster script with a sample flow in your mobster home directory :

 
'-d outputdir', help='Write JSON file to specified directory'
'-f filename', help='Used specified name for JSON file'
'-u urls', help='Comma separated URLs to profile'
'-t testfile', required=True, help='Use specified JSON test file to determine test actions'
'-i iterations', help='Do profiling task the specified number of times'
'-a average', action='store_true', help='Output the average results of the iterations'
'-p report', action='store_true', help='Call make_report.py to make a report and open it'

./bin/mobster.py -t sampleinput/sample.json -i 1 -a -p

You should now be viewing the report in the browser. To learn how to make your own flows, look at the scripts in the bin/sampleinput/ directory.

Using Mobster to measure performance of web applications on Desktop

Prerequisites -

  • Download and install Python 2.6.6+ (but not Python 3) .
  • You should download and install PIP, you can find instructions to download and install PIP here
  • You should install Chrome 18+
  1. Check out mobster code ( using git clone command )

  2. Install the packages listed in requirements.txt

cd mobster pip install -r requirements.txt

  1. Start Chrome on your desktop with remote debugging enabled and remote debugging port set to 9222:

Mac OS:

 open -a "Google Chrome" --args --remote-debugging-port=9222 --enable-memory-info 

Red Hat Linux (assuming google-chrome is in your PATH):

 google-chrome --args --remote-debugging-port=9222 

To test if the remote debugging is working try this on your chrome browser - http://localhost:9222

  1. Run the main Mobster script with a sample flow in your mobster home directory :
 ./bin/mobster.py -o data.json -t bin/sampleinput/sample.json 
  1. Generate a report with the collected data and open it in a browser:
 ./bin/make_report.py -r data.json -b 

You should now be viewing the report in the browser. To learn how to make your own flows, look at the scripts in the bin/sampleinput/ directory.

About

Mobster is a tool that can help you get deeper understanding into the performance of mobile web applications on real mobile devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 91.8%
  • Python 6.1%
  • JavaScript 2.1%