[wiki:WikiStart Orbit] > [wiki:Documentation/Athstats Athstats] > [wiki:Documentation/Athstats/ScriptsRepository 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") p.name = "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. athstats.bindProperty('interface') athstats.bindProperty('interval') # Metrics reported. athstats.addMeasurement('queryport', Filter::SAMPLE, {Filter::SAMPLE_SIZE => 1}, [ ['succ_tx_attempts'], ['fail_xretries'], ['fail_fifoerr'], ['fail_filtered'], ['short_retries'], ['long_retries'], ['total_frames_rcvd'], ['crc_errors'], ['fifo_errors'], ['phy_errors'] ] ) if $0 == __FILE__ p.to_xml.write($stdout, 2) puts end }}}