Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Boxiang Sun
slapos.toolbox
Commits
f3f875fd
Commit
f3f875fd
authored
Jan 05, 2018
by
Hardik Juneja
Committed by
Rafael Monnerat
Jan 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_apachedex_result: make sure threshold is of type float
/reviewed-on
!26
parent
63a514f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
slapos/promise/check_apachedex_result/__init__.py
slapos/promise/check_apachedex_result/__init__.py
+3
-4
No files found.
slapos/promise/check_apachedex_result/__init__.py
View file @
f3f875fd
...
...
@@ -36,10 +36,9 @@ def checkApachedexResult(apachedex_path, apachedex_report_status_file, desired_t
if
m
:
apx_result
=
int
(
m
[
0
])
if
apx_result
>
desired_threshold
:
return
0
,
"Thanks for keeping it all clean, result is
"
+
str
(
apx_result
)
return
0
,
"Thanks for keeping it all clean, result is
%s"
%
apx_result
else
:
return
1
,
"Threshold is lower than expected: Expected was "
+
\
str
(
desired_threshold
)
+
" and current result is "
+
str
(
apx_result
)
return
1
,
"Threshold is lower than expected: Expected was %f and current result is %s"
%
(
desired_threshold
,
apx_result
)
message
=
"No result found in the apdex file or the file is corrupted"
break
...
...
@@ -56,7 +55,7 @@ def main():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--apachedex_path"
,
required
=
True
)
parser
.
add_argument
(
"--status_file"
,
required
=
True
)
parser
.
add_argument
(
"--threshold"
,
required
=
True
)
parser
.
add_argument
(
"--threshold"
,
required
=
True
,
type
=
float
)
args
=
parser
.
parse_args
()
status
,
message
=
checkApachedexResult
(
args
.
apachedex_path
,
args
.
status_file
,
args
.
threshold
)
...
...
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