Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
preetwinder
erp5
Commits
98cdce84
Commit
98cdce84
authored
13 years ago
by
Arnaud Fontaine
Browse files
Options
Download
Email Patches
Plain Diff
Use dynamic ticks otherwise plots get unreadable.
parent
4090e87d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
erp5/util/benchmark/report.py
erp5/util/benchmark/report.py
+5
-10
No files found.
erp5/util/benchmark/report.py
View file @
98cdce84
...
...
@@ -243,8 +243,8 @@ def drawBarDiagram(pdf, title, stat_list):
axes
.
set_ylabel
(
'Seconds'
)
axes
.
set_xticks
([])
axes
.
yaxis
.
set_major_locator
(
ticker
.
M
ultiple
Locator
(
0.5
))
axes
.
yaxis
.
set_minor_locator
(
ticker
.
Multiple
Locator
(
0.25
))
axes
.
yaxis
.
set_major_locator
(
ticker
.
M
axN
Locator
(
nbins
=
20
))
axes
.
yaxis
.
set_minor_locator
(
ticker
.
AutoMinor
Locator
())
axes
.
yaxis
.
grid
(
True
,
'major'
,
linewidth
=
1.5
)
axes
.
yaxis
.
grid
(
True
,
'minor'
)
...
...
@@ -374,13 +374,8 @@ def drawUseCasePerNumberOfUserPlot(axes,
axes
.
plot
(
time_cum_max_list
,
use_case_cum_max_list
,
'gs-'
,
label
=
'Maximum'
)
use_case_count_max
=
use_case_count_list
[
0
].
maximum
# TODO: Must be dynamic...
return
(
ticker
.
MultipleLocator
(
120
),
ticker
.
MultipleLocator
(
15
),
ticker
.
MultipleLocator
(
use_case_count_max
*
2
),
ticker
.
MultipleLocator
(
use_case_count_max
))
return
(
ticker
.
MaxNLocator
(
nbins
=
20
),
ticker
.
AutoMinorLocator
(),
ticker
.
MaxNLocator
(
nbins
=
20
),
ticker
.
AutoMinorLocator
())
@
drawPlotDecorator
(
xlabel
=
'Concurrent Users'
,
ylabel
=
'Use cases/h'
)
...
...
@@ -477,7 +472,7 @@ def drawConcurrentUsersPlot(axes, nb_users_list, stat_list):
pyplot
.
xlim
(
xmin
=
nb_users_list
[
0
])
return
(
ticker
.
FixedLocator
(
nb_users_list
),
None
,
ticker
.
M
ultiple
Locator
(
0.5
),
ticker
.
Multiple
Locator
(
0.25
))
ticker
.
M
axN
Locator
(
nbins
=
20
),
ticker
.
AutoMinor
Locator
())
from
matplotlib.backends.backend_pdf
import
PdfPages
...
...
This diff is collapsed.
Click to expand it.
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