diff options
Diffstat (limited to 'scripts/getstats.py')
-rwxr-xr-x | scripts/getstats.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/getstats.py b/scripts/getstats.py index 286a162..5527c46 100755 --- a/scripts/getstats.py +++ b/scripts/getstats.py @@ -10,6 +10,7 @@ from gettimeseriesstats import GetTimeSeriesStatsAsJSON from gettimeseriesdetails import GetTimeSeriesDetailsAsJSON from getsnapshots import GetSnapshotsAsJSON from getrankings import GetRankingsAsJSON +from settimeseriesnote import SetTimeSeriesNote from dbaccess import setDatabase from misc import printErrorAsJSON @@ -88,7 +89,9 @@ def createCommand(options, http_get): "--branch B --sha11 S --sha12 S | \\\n" + " --db D --cmd rankings --host H --platform P " + "--branch B --sha1 S [--testcasefilter 'TC1 TC2 ...'] " + - "[--maxsize M]") + "[--maxsize M] | \\\n" + + " --db D --cmd settimeseriesnote --host H --platform P " + + "--branch B --benchmark B --metric M --note N") if http_get: printErrorAsJSON("usage error") @@ -309,6 +312,24 @@ def createCommand(options, http_get): return GetRankingsAsJSON( host, platform, branch, sha1, test_case_filter, maxsize) + # --- 'settimeseriesnote' --------------------------------- + # ### Hm ... this command doesn't really get statistics, so maybe + # rename getstats.py to something more generic + # (like bmclient.py) ....... 2 B DONE! + elif cmd == "settimeseriesnote": + if ("host" in options and "platform" in options and + "branch" in options and "benchmark" in options and + "metric" in options and "note" in options): + host = options["host"] + platform = options["platform"] + branch = options["branch"] + benchmark = options["benchmark"] + metric = options["metric"] + note = options["note"] + + return SetTimeSeriesNote( + host, platform, branch, benchmark, metric, note) + # No match: printUsageError() sys.exit(1) |