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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ludovic Kiefer
erp5
Commits
9c104866
Commit
9c104866
authored
Dec 07, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a dict to store per number of users use cases for readability sake.
parent
75b04e70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
erp5/util/benchmark/report.py
erp5/util/benchmark/report.py
+30
-18
No files found.
erp5/util/benchmark/report.py
View file @
9c104866
...
...
@@ -112,7 +112,9 @@ def computeStatisticFromFilenameList(argument_namespace, filename_list):
#
# TODO: Assuming that there was at least one test result
# before
use_case_suite_dict
[
suite_name
]
=
[[],
[]]
use_case_suite_dict
[
suite_name
]
=
{
'duration_stats'
:
[],
'count_stats'
:
[]}
row_use_case_mapping_dict
[
index
]
=
suite_name
else
:
if
argument_namespace
.
do_merge_label
:
...
...
@@ -137,21 +139,31 @@ def computeStatisticFromFilenameList(argument_namespace, filename_list):
use_case_suite
=
row_use_case_mapping_dict
.
get
(
idx
,
None
)
if
use_case_suite
:
current_count
=
int
(
row
)
current_duration
=
int
(
row_iter
.
next
()[
1
])
/
60.0
# For stats by iteration, used later on to generate cases per
# minutes plot for a given number of users
by_iteration_dict
=
use_case_suite_dict
[
use_case_suite
]
count_stat_list
=
by_iteration_dict
[
'count_stats'
]
duration_stat_list
=
by_iteration_dict
[
'duration_stats'
]
try
:
stat_
use_case
=
use_case_suite_dict
[
use_case_suite
][
0
]
[
row_index
]
stat_
time_elapsed
=
use_case_suite_dict
[
use_case_suite
][
1
]
[
row_index
]
stat_
count
=
count_stat_list
[
row_index
]
stat_
duration
=
duration_stat_list
[
row_index
]
except
IndexError
:
stat_
use_case
=
BenchmarkResultStatistic
(
use_case_suite
,
'Use cases count'
)
stat_
count
=
BenchmarkResultStatistic
(
use_case_suite
,
'Use cases count'
)
stat_time_elapsed
=
BenchmarkResultStatistic
(
use_case_suite
,
'Time elapsed'
)
count_stat_list
.
append
(
stat_count
)
use_case_suite_dict
[
use_case_suite
][
0
].
append
(
stat_use_case
)
use_case_suite_dict
[
use_case_suite
][
1
].
append
(
stat_time_elapsed
)
stat_duration
=
BenchmarkResultStatistic
(
use_case_suite
,
'Time elapsed'
)
stat_use_case
.
add
(
int
(
row
))
stat_time_elapsed
.
add
(
int
(
row_iter
.
next
()[
1
])
/
60.0
)
duration_stat_list
.
append
(
stat_duration
)
stat_count
.
add
(
current_count
)
stat_duration
.
add
(
current_duration
)
else
:
index
=
merged_label_dict
.
get
(
label_list
[
idx
],
idx
)
stat_list
[
index
].
add
(
float
(
row
))
...
...
@@ -417,13 +429,13 @@ def generateReport():
stat_list
[
slice_start_idx
:
slice_start_idx
+
DIAGRAM_PER_PAGE
])
for
suite_name
,
(
use_case_count_list
,
time_elapsed_list
)
in
\
use_case_dict
.
viewitems
():
title
=
"Scalability for %s with %d users"
%
(
suite_name
,
nb_users
)
drawUseCasePerNumberOfUserPlot
(
pdf
,
title
,
use_case_count_list
,
time_elapsed_list
,
is_single_plot
=
(
nb_users
==
1
))
for
suite_name
,
use_case_dict
in
use_case_dict
.
viewitems
():
drawUseCasePerNumberOfUserPlot
(
pdf
,
"Scalability for %s with %d users"
%
(
suite_name
,
nb_users
)
,
use_case_dict
[
'count_stats'
]
,
use_case_dict
[
'duration_stats'
]
,
is_single_plot
=
(
nb_users
==
1
))
report_dict
[
'stats'
]
=
stat_list
report_dict
[
'use_cases'
]
=
use_case_dict
...
...
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