Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
b6539882
Commit
b6539882
authored
Dec 08, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix number of use cases calculation for use case plot.
parent
374a7af3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
erp5/util/benchmark/report.py
erp5/util/benchmark/report.py
+8
-6
No files found.
erp5/util/benchmark/report.py
View file @
b6539882
...
...
@@ -337,11 +337,12 @@ def drawBarDiagram(axes, stat_list, only_average=False):
@
drawDecorator
(
xlabel
=
'Time (in hours)'
,
ylabel
=
'Use cases'
)
def
drawUseCasePerNumberOfUserPlot
(
axes
,
nb_users
,
use_case_count_list
,
time_elapsed_list
,
is_single_plot
=
False
,
only_average
=
False
):
def
get_cum_stat
(
stat_list
):
def
get_cum_stat
(
stat_list
,
process_function
=
lambda
x
:
x
):
cum_min_list
=
[]
cum_min
=
0
cum_mean_list
=
[]
...
...
@@ -349,24 +350,24 @@ def drawUseCasePerNumberOfUserPlot(axes,
cum_max_list
=
[]
cum_max
=
0
for
stat
in
stat_list
:
cum_min
+=
stat
.
minimum
cum_min
+=
process_function
(
stat
.
minimum
)
cum_min_list
.
append
(
cum_min
)
cum_mean
+=
stat
.
mean
cum_mean
+=
process_function
(
stat
.
mean
)
cum_mean_list
.
append
(
cum_mean
)
cum_max
+=
stat
.
maximum
cum_max
+=
process_function
(
stat
.
maximum
)
cum_max_list
.
append
(
cum_max
)
return
cum_min_list
,
cum_mean_list
,
cum_max_list
use_case_cum_min_list
,
use_case_cum_mean_list
,
use_case_cum_max_list
=
\
get_cum_stat
(
use_case_count_list
)
get_cum_stat
(
use_case_count_list
,
process_function
=
lambda
x
:
x
*
nb_users
)
time_cum_min_list
,
time_cum_mean_list
,
time_cum_max_list
=
\
get_cum_stat
(
time_elapsed_list
)
# TODO: cleanup
if
is_single_plot
:
axes
.
plot
(
time_cum_max_list
,
use_case_cum_max_list
,
'gs-'
)
else
:
...
...
@@ -547,6 +548,7 @@ def generateReport():
drawUseCasePerNumberOfUserPlot
(
pdf
,
"Scalability for %s with %d users"
%
(
suite_name
,
nb_users
),
nb_users
,
use_case_dict
[
'count_stats'
],
use_case_dict
[
'duration_stats'
],
is_single_plot
=
(
nb_users
==
1
),
...
...
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