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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
apachedex
Commits
16c75a95
Commit
16c75a95
authored
Apr 14, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toward Python3: str/None comparison
parent
cd057e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
apachedex/__init__.py
apachedex/__init__.py
+5
-3
No files found.
apachedex/__init__.py
View file @
16c75a95
...
...
@@ -82,6 +82,7 @@ AUTO_PERIOD_COEF = 200
# Larger (x < LARGER_THAN_INTEGER_STR == True) than any string starting with
# a number
LARGER_THAN_INTEGER_STR
=
'A'
SMALLER_THAN_INTEGER_STR
=
''
def
statusIsError
(
status
):
return
status
[
0
]
>
'3'
...
...
@@ -997,7 +998,7 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
'<tr><th>date</th><th>hits</th></tr>'
%
period
)
hit_per_day
=
defaultdict
(
int
)
x_min
=
LARGER_THAN_INTEGER_STR
x_max
=
None
x_max
=
SMALLER_THAN_INTEGER_STR
for
site_data
in
per_site
.
itervalues
():
apdex_data_list
=
site_data
.
getApdexData
()
if
apdex_data_list
:
...
...
@@ -1007,6 +1008,7 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
hit_per_day
[
decimator
(
hit_date
)]
+=
hit
if
x_min
==
LARGER_THAN_INTEGER_STR
:
x_min
=
None
x_max
=
None
for
hit_date
,
hit
in
sorted
(
hit_per_day
.
iteritems
(),
key
=
ITEMGETTER0
):
out
.
write
(
'<tr><td>%s</td><td>%s</td></tr>'
%
(
hit_date
,
hit
))
out
.
write
(
'</table>'
)
...
...
@@ -1330,9 +1332,9 @@ def main():
continue
hit_date
=
asDate
(
match
.
group
(
'timestamp'
))
if
to_next_period
is
not
None
:
if
hit_date
>
latest_date
:
# '' > None is True
if
latest_date
is
None
or
latest_date
<
hit_date
:
latest_date
=
hit_date
if
hit_date
<
earliest_date
or
earliest_date
is
Non
e
:
if
earliest_date
is
None
or
hit_date
<
earliest_dat
e
:
earliest_date
=
hit_date
next_period
=
getNextPeriod
()
try
:
...
...
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