Commit 690a66a1 authored by Vincent Pelletier's avatar Vincent Pelletier

Document missing --period arguments in README.

parent 6eb8d6ec
......@@ -215,15 +215,17 @@ to 200 graph points, which represents a varying number of table columns.
.. table :: Details of `--period` argument
======== ======= ======= ============== =========================
--period graph table to next period columns until next period
======== ======= ======= ============== =========================
day hour day 200 hours 9 (8.3 days)
week 6 hours week 1200 hours 8 (7.1 weeks)
month day month 5000 hours 7 (~6.7 months)
quarter 7 days quarter 1400 days 16 (15.3 weeks)
year month year (n/a) (infinity)
======== ======= ======= ============== =========================
=========== ========== ========== ============== =========================
--period graph table to next period columns until next period
=========== ========== ========== ============== =========================
quarterhour minute 15 minutes 200 minutes 8 (3.3 hours)
halfday 30 minutes 12 hours 100 hours 9 (4.1 days)
day hour day 200 hours 9 (8.3 days)
week 6 hours week 1200 hours 8 (7.1 weeks)
month day month 5000 hours 7 (~6.7 months)
quarter 7 days quarter 1400 days 16 (15.3 weeks)
year month year (n/a) (infinity)
=========== ========== ========== ============== =========================
"7 days" period used in `--period quarter` are not weeks strictly
speaking: a week starts a monday/sunday, pendending on the locale.
......
......@@ -121,13 +121,6 @@ ITEMGETTER0 = itemgetter(0)
ITEMGETTER1 = itemgetter(1)
APDEX_TOLERATING_COEF = 4
AUTO_PERIOD_COEF = 200
# X -> Y: Z Switch from period X to Y after Z periods
# quarter -> year: 15 quarters (3.75 years)
# month -> quarter: 6.5 months
# week -> month: 7.14 weeks (50 days)
# day -> week: 8.3 days
# halfday -> day: 8.2 halfdays (100 hours, 4.1 days)
# halfhour -> halfday: 6.6 halfhours (200 minutes)
# Larger (x < LARGER_THAN_INTEGER_STR == True) than any string starting with
# a number
......@@ -986,7 +979,6 @@ def _asQuarterHourString(timestamp):
# than what it should be.
period_parser = {
'year': (
# graph/table ratio: 12
_asMonthString,
lambda x: x.split('/', 1)[0],
'month',
......@@ -998,7 +990,6 @@ period_parser = {
lambda x: 31. / calendar.monthrange(x.year, x.month)[1],
),
'quarter': (
# graph/table ratio: 13(.2)
_asWeekString,
_weekStringAsQuarterString,
# Note: Not calendar weeks, but chunks of 7 days starting on first year's
......@@ -1011,7 +1002,6 @@ period_parser = {
_getWeekCoefficient,
),
'month': (
# graph/table ratio: 31
_asDayString,
lambda x: '/'.join(x.split('/', 2)[:2]),
'day',
......@@ -1023,7 +1013,6 @@ period_parser = {
lambda x: 1,
),
'week': (
# graph/table ratio: 28
_as6HourString,
_hourAsWeekString,
'6 hours',
......@@ -1034,7 +1023,6 @@ period_parser = {
lambda x: 1,
),
'day': (
# graph/table ratio: 24
_asHourString,
lambda x: x.split(' ')[0],
'hour',
......@@ -1046,7 +1034,6 @@ period_parser = {
lambda x: 1,
),
'halfday': (
# graph/table ratio: 24
_as30MinutesString,
_asHalfDayString,
'30 minutes',
......@@ -1056,7 +1043,6 @@ period_parser = {
lambda x: 1,
),
'quarterhour': (
# graph/table ratio: 30
_asMinuteString,
_asQuarterHourString,
'minute',
......
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