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
cf79c7b2
Commit
cf79c7b2
authored
Apr 11, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable rescaling when maximum period is exceeded.
parent
29955e09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
apachedex/__init__.py
apachedex/__init__.py
+9
-7
No files found.
apachedex/__init__.py
View file @
cf79c7b2
...
...
@@ -1220,6 +1220,7 @@ def main():
next_period_data
=
((
x
,
y
[
4
]
*
AUTO_PERIOD_COEF
)
for
(
x
,
y
)
in
sorted
(
period_parser
.
iteritems
(),
key
=
lambda
x
:
x
[
1
][
4
])).
next
period
,
to_next_period
=
next_period_data
()
original_period
=
period
earliest_date
=
latest_date
=
None
def
getNextPeriod
():
# datetime is slow (compared to string operations), but not many choices
...
...
@@ -1351,13 +1352,14 @@ def main():
if
hit_date
<
earliest_date
or
earliest_date
is
None
:
earliest_date
=
hit_date
next_period
=
getNextPeriod
()
if
latest_date
>
next_period
:
try
:
while
latest_date
>
next_period
:
period
,
to_next_period
=
next_period_data
()
next_period
=
getNextPeriod
()
except
StopIteration
:
pass
try
:
while
latest_date
>
next_period
:
period
,
to_next_period
=
next_period_data
()
next_period
=
getNextPeriod
()
except
StopIteration
:
to_next_period
=
None
if
original_period
!=
period
:
original_period
=
period
if
show_progress
:
print
>>
sys
.
stderr
,
'Increasing period to'
,
period
,
'...'
,
old_date_format
=
date_format
...
...
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