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():
...
@@ -1220,6 +1220,7 @@ def main():
next_period_data
=
((
x
,
y
[
4
]
*
AUTO_PERIOD_COEF
)
for
(
x
,
y
)
in
next_period_data
=
((
x
,
y
[
4
]
*
AUTO_PERIOD_COEF
)
for
(
x
,
y
)
in
sorted
(
period_parser
.
iteritems
(),
key
=
lambda
x
:
x
[
1
][
4
])).
next
sorted
(
period_parser
.
iteritems
(),
key
=
lambda
x
:
x
[
1
][
4
])).
next
period
,
to_next_period
=
next_period_data
()
period
,
to_next_period
=
next_period_data
()
original_period
=
period
earliest_date
=
latest_date
=
None
earliest_date
=
latest_date
=
None
def
getNextPeriod
():
def
getNextPeriod
():
# datetime is slow (compared to string operations), but not many choices
# datetime is slow (compared to string operations), but not many choices
...
@@ -1351,13 +1352,14 @@ def main():
...
@@ -1351,13 +1352,14 @@ def main():
if
hit_date
<
earliest_date
or
earliest_date
is
None
:
if
hit_date
<
earliest_date
or
earliest_date
is
None
:
earliest_date
=
hit_date
earliest_date
=
hit_date
next_period
=
getNextPeriod
()
next_period
=
getNextPeriod
()
if
latest_date
>
next_period
:
try
:
try
:
while
latest_date
>
next_period
:
while
latest_date
>
next_period
:
period
,
to_next_period
=
next_period_data
()
period
,
to_next_period
=
next_period_data
()
next_period
=
getNextPeriod
()
next_period
=
getNextPeriod
()
except
StopIteration
:
except
StopIteration
:
to_next_period
=
None
pass
if
original_period
!=
period
:
original_period
=
period
if
show_progress
:
if
show_progress
:
print
>>
sys
.
stderr
,
'Increasing period to'
,
period
,
'...'
,
print
>>
sys
.
stderr
,
'Increasing period to'
,
period
,
'...'
,
old_date_format
=
date_format
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