Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
apachedex
Commits
90ba5e0e
Commit
90ba5e0e
authored
Apr 04, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include graph period in graph titles.
Because "hits" needs a "per $period" to be meaningful.
parent
d6683265
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
apachedex/__init__.py
apachedex/__init__.py
+5
-5
No files found.
apachedex/__init__.py
View file @
90ba5e0e
...
...
@@ -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
(
'
A
pdex'
,
graph
(
'
a
pdex'
,
[
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'
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment