You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Fabrizio Furnari 1578ac3679 README 5 years ago
.gitignore ignore binary (too late) 5 years ago
Makefile added build script for container (buildah) 5 years ago
README.org README 5 years ago
build.sh added build script for container (buildah) 5 years ago
main.go function renaming and streaming mode 5 years ago
stats.go Added other stats and json serialization 5 years ago
struct.go Added other stats and json serialization 5 years ago

README.org

Install dependencies

  • make deps

Compile

  • make build

Compile and run

  • make run

Build container image (must have buildah installed)

  • buildah unshare
  • ./build.sh

NOTE: Not sure about "system metrics" when run in container…

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'
  • Check the ongoing test printing result in JSON format: curl 'http://localhost:8080/status?format=json'

ToDo

  • Add other output format
  • Add other data gathering types
  • Calculate statistics for Disk IO and Network
  • Multiple tests (store results of old tests on disk)
  • Render simple graphs in web page with RRDTools
  • Calculate and optimize footprint