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