Orbit > Athstats > Scripts Repository > driverqueryapp.rb

This prototype file translates to running an application, defined by the test_app_athstats.rb or test/app/athstats.rb file. This application has two command-line arguments (—interface and —interval) defined by the bindProperty statement below. It reports three metrics, defined by the addMeasurement statement.

# Define a prototype
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:driverqueryapp") = "Wireless Driver Stats"
p.description = "Statistics obtained by querying the driver periodically"
p.defProperty('interface', 'interface to gather stats from')
p.defProperty('interval', 'How often to query the driver')

athstats = p.addApplication('athstats', "test:app:athstats")

# Command-line arguments for the application.

# Metrics reported.
athstats.addMeasurement('queryport',  Filter::SAMPLE,
  {Filter::SAMPLE_SIZE => 1},

if $0 == __FILE__
  p.to_xml.write($stdout, 2)

Last modified 14 years ago Last modified on Jul 31, 2006, 1:27:17 AM
Note: See TracWiki for help on using the wiki.