Skip to content

Commit

Permalink
PRF_DETAIL_AVRG as math.nan
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Oct 13, 2023
1 parent f4b607c commit 252a8d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qgate_perf/parallel_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import os, sys, math
import json

from qgate_perf.file_format import FileFormat
from qgate_perf.run_setup import RunSetup

Expand Down Expand Up @@ -93,12 +94,13 @@ def _wait_for_others(self, when_start, tollerance=0.1):

def ToString(self):
""" Provider view to return value """

if self.exception is None:
out={
FileFormat.PRF_TYPE: FileFormat.PRF_DETAIL_TYPE,
FileFormat.PRF_DETAIL_PROCESSID: self.pid,
FileFormat.PRF_DETAIL_CALLS: self.counter,
FileFormat.PRF_DETAIL_AVRG: 0 if self.counter==0 else self.total_duration / self.counter,
FileFormat.PRF_DETAIL_AVRG: math.nan if self.counter == 0 else self.total_duration / self.counter,
FileFormat.PRF_DETAIL_MIN: self.min_duration,
FileFormat.PRF_DETAIL_MAX: self.max_duration,
FileFormat.PRF_DETAIL_STDEV: self.standard_deviation,
Expand Down

0 comments on commit 252a8d8

Please sign in to comment.