diff --git a/README.org b/README.org index 3d48c03..2ed8966 100644 --- a/README.org +++ b/README.org @@ -1 +1,40 @@ -- =apt-get install libstatgrab-dev= +* Install + +- =make deps= + +* Compile + +- =make build= + +* Compile and run + +- =make run= + +* Usage + +Use =metrorama -h= to see a list of flags and options. + +Once started it can be call on following routes: + +- =/start=: starts the data gathering. Every new start deletes previous collected datas so only one test at the time can be run (by design?). + + Parameters: + - =rate= set the gathering interval rate (in ms). Default: 500ms + - =timeout= set a timeout to stop gathering data: Default: 10s + - =name= set an identifier for the test. Default is autogenerated one. + +These parameters can be specified also via CLI options at the server start. In this case minimum rate and maximum timeout are not specified so beware. + +HTTP parameters overrides CLI ones (but are restricted to boundaries). + +- =/stop=: stops the data gathering and prints result + +- =/status=: prints the collected results while the test is running or is complete. + + Parameters: + - =format=json=: print results in JSON format + +* Examples + +- Start the server with default optiokns: =./metrorama= +- Start a simple test with name "sample-test" and a timeout of 20s: =curl 'http://localhost:8080/start?name=sample-test&timeout=20'=