Commit fe5d3fbe authored by Vincent Pelletier's avatar Vincent Pelletier

Reduce the number of placeholders to strict minimum.

parent 787ba85c
......@@ -112,9 +112,11 @@ def prepareDataForGraph(daily_data, date_format, placeholder_delta,
append = new_daily_data.append
for (measure_date_string, apdex, hit) in daily_data:
measure_date = datetime.strptime(measure_date_string, date_format)
while current_date < measure_date:
if current_date < measure_date:
append((current_date.strftime(date_format), 100, 0))
current_date += placeholder_delta
placeholder_end_date = measure_date - placeholder_delta
if placeholder_end_date > current_date:
append((placeholder_end_date.strftime(date_format), 100, 0))
append((measure_date_string, apdex,
hit * coefficient_callback(measure_date)))
current_date = measure_date + placeholder_delta
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment