VirtualBox

Ignore:
Timestamp:
Oct 24, 2022 2:36:36 PM (2 years ago)
Author:
vboxsync
Message:

ValKit/analysis: Added some crude value result analysis into the mix. Improved output a little.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/analysis/reader.py

    r97267 r97279  
    9797        "ns/roundtrip":     -2,
    9898        "ins":              +2,
    99         "ins/sec":          -1,
     99        "ins/sec":          +2,
    100100        "":                 +1, # Difficult to say what's best really.
    101101        "pp1k":             -2,
     
    127127        assert self.lValue is None or isinstance(self.lValue, (int, long)), "lValue=%s %s" % (self.lValue, type(self.lValue),);
    128128
    129         # Members set by processing.
    130         self.sDiff      = None;
    131 
    132129    def clone(self, oParentTest):
    133130        """
     
    150147        return False;
    151148
     149    def canDoBetterCompare(self):
     150        """
     151        Checks whether we can do a confident better-than comparsion of the value.
     152        """
     153        return self.sUnit is not None  and  self.kdBestByUnit[self.sUnit] not in (-1, 0, 1);
     154
     155    def getBetterRelation(self):
     156        """
     157        Returns +2 if larger values are definintely better.
     158        Returns +1 if larger values are likely to be better.
     159        Returns 0 if we have no clue.
     160        Returns -1 if smaller values are likey to better.
     161        Returns -2 if smaller values are definitely better.
     162        """
     163        if self.sUnit is None:
     164            return 0;
     165        return self.kdBestByUnit[self.sUnit];
    152166
    153167    @staticmethod
     
    227241        self.sStatus        = None;
    228242        self.cErrors        = -1;
    229 
    230         # Members set by processing.
    231         self.sStatusDiff    = None;
    232         self.cErrorsDiff    = None;
    233243
    234244    def clone(self, oParent = None):
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette