Merge "Fix make_test_data.sh"

This commit is contained in:
Jenkins 2015-10-12 12:34:49 +00:00 committed by Gerrit Code Review
commit 6863d47c7c
2 changed files with 5 additions and 6 deletions

View File

@ -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 '

View File

@ -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)