예제 #1
0
파일: sorters.py 프로젝트: surajrb/checkmk
 def cmp(self, r1, r2):
     return (
         (utils.savefloat(get_perfdata_nth_value(r1, self._num - 1, True)) >
          utils.savefloat(get_perfdata_nth_value(r2, self._num - 1, True)))
         -
         (utils.savefloat(get_perfdata_nth_value(r1, self._num - 1, True)) <
          utils.savefloat(get_perfdata_nth_value(r2, self._num - 1, True))))
예제 #2
0
파일: sorters.py 프로젝트: petrows/checkmk
 def cmp(self, r1, r2):
     v1 = utils.savefloat(get_perfdata_nth_value(r1, self._num - 1, True))
     v2 = utils.savefloat(get_perfdata_nth_value(r2, self._num - 1, True))
     return (v1 > v2) - (v1 < v2)