Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX elapsed of nodes #609

Open
wants to merge 2 commits into
base: v1/stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions checks/robotmk.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,9 @@ def _get_subnodes(self, xmlnode):
return subnodes

def _get_node_elapsed_time(self):
"""Returns the time between given timestamps of a node in seconds."""
self.start_time = self.xmlnode.find("status").attrib["starttime"]
self.end_time = self.xmlnode.find("status").attrib["endtime"]
if self.start_time == self.end_time or not (self.start_time and self.end_time):
return 0
start_millis = timestamp_to_millis(self.start_time)
end_millis = timestamp_to_millis(self.end_time)
# start/end_millis can be long but we want to return int when possible
return int(end_millis - start_millis) / float(1000)
"""Returns the time elapsed of a node in seconds."""
self.elapsed = self.xmlnode.find("status").attrib["elapsed"]
return self.elapsed

# If the pattern for a WATO <setting> matches, return the value (if tuple) or True
def _get_pattern_value(self, setting, check_params):
Expand Down
Loading