From 861a0ce1c188126a84ce8cc700fcf7840d9c7df6 Mon Sep 17 00:00:00 2001 From: liusheng Date: Sat, 10 Oct 2015 16:58:49 +0800 Subject: Fix make_test_data.sh For now, the make_test_data.sh cannot work, because of some parameter mistakes Change-Id: I9bb02790ad8995bcdd296f9b2412eb3515863a38 --- tools/make_test_data.py | 9 ++++----- tools/make_test_data.sh | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/make_test_data.py b/tools/make_test_data.py index 90c1c912..d99650c1 100755 --- a/tools/make_test_data.py +++ b/tools/make_test_data.py @@ -58,8 +58,8 @@ def make_test_data(name, meter_type, unit, volume, random_min, increment = datetime.timedelta(minutes=interval) - print('Adding new events for meter %s.' % (name)) - # Generate events + print('Adding new samples for meter %s.' % (name)) + # Generate samples n = 0 total_volume = volume while timestamp <= end: @@ -95,7 +95,7 @@ def make_test_data(name, meter_type, unit, volume, random_min, # volume. total_volume = volume - print('Added %d new events for meter %s.' % (n, name)) + print('Added %d new samples for meter %s.' % (n, name)) def record_test_data(conn, *args, **kwargs): @@ -111,7 +111,7 @@ def get_parser(): '--interval', default=10, type=int, - help='The period between events, in minutes.', + help='The period between samples, in minutes.', ) parser.add_argument( '--start', @@ -121,7 +121,6 @@ def get_parser(): ) parser.add_argument( '--end', - type=int, default=2, help='Number of days to be stepped forward from now or date in the ' 'future ("YYYY-MM-DDTHH:MM:SS" format) to define timestamps end ' diff --git a/tools/make_test_data.sh b/tools/make_test_data.sh index 1afe5905..0e6304b5 100755 --- a/tools/make_test_data.sh +++ b/tools/make_test_data.sh @@ -49,7 +49,7 @@ late2="2012-08-31T20:00:00" mkdata() { ${bindir}/make_test_data.py --project "$project" \ --user "$user" --start "$2" --end "$3" \ - "$1" instance:m1.tiny 1 + --resource "$1" --counter instance:m1.tiny --volume 1 } dates=(early1 early2 start middle1 middle2 middle3 middle4 end late1 late2) -- cgit v1.2.1