Commit 90ba5e0e authored by Vincent Pelletier's avatar Vincent Pelletier

Include graph period in graph titles.

Because "hits" needs a "per $period" to be meaningful.
parent d6683265
......@@ -375,8 +375,8 @@ def _asHourString(timestamp):
return '%s/%02i/%s %s' % (year, MONTH_VALUE_DICT[month], day, hour)
period_parser = {
'month': (_asDayString, lambda x: '/'.join(x.split('/', 2)[:2])),
'day': (_asHourString, lambda x: x.split(' ')[0]),
'month': (_asDayString, lambda x: '/'.join(x.split('/', 2)[:2]), 'day'),
'day': (_asHourString, lambda x: x.split(' ')[0], 'hour'),
}
def main():
......@@ -442,7 +442,7 @@ def main():
assert not key, key
matchline = re.compile(line_regex).match
matchrequest = REQUEST_PATTERN.match
asDate, decimator = period_parser[args.period]
asDate, decimator, graph_period = period_parser[args.period]
site_list = args.path
default_site = args.default
if default_site is None:
......@@ -572,7 +572,7 @@ def main():
# Guesstimation: 6px per digit. If only em were allowed...
yLabelWidth = max(int(math.log10(max(x[4] for x in daily_data))) + 1,
3) * 6
graph('Apdex',
graph('apdex',
[zip(date_list, (x[1] for x in daily_data))],
{
'xaxis': {
......@@ -589,7 +589,7 @@ def main():
'points': {'show': True},
},
)
graph('Hits',
graph('Hits (per %s)' % graph_period,
[zip(date_list, (x[4] for x in daily_data))],
{
'xaxis': {
......
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