code
stringlengths
3
6.57k
len(times)
meets_confidence(threshold=threshold)
timer()
range(block_size)
timer()
trivial (order single to low double digit microseconds)
statistics. (mean, median, etc.)
self._estimate_block_size(min_run_time)
time_hook()
self._timer.timeit(number)
stop_hook(times: List[float])
caller (this process)
structures. (Unlike timing methods)
isinstance(self._task_spec.stmt, str)
ValueError("`collect_callgrind` currently only supports string `stmt`")
self._timer.timeit(1)
valgrind_timer_interface.wrapper_singleton()
Range(object)
__init__(self, lowerCut, upperCut)
bound(s)
all(map(lambda x: isinstance(x, Cut)
ValueError("Bounds must be Cut objects")
ValueError("Lower bound cannot be greater than upper bound")
__repr__(self)
self.isLowerBoundClosed()
str(self.lowerCut.point)
str(self.upperCut.point)
self.isUpperBoundClosed()
__hash__(self)
return (hash(self.lowerCut)
hash(self.upperCut)
__eq__(self, other)
isinstance(other, Range)
return ((self.lowerCut == other.lowerCut)
__ne__(self, other)
self.__eq__(other)
contains(self, val)
containsAll(self, vals)
self.contains(val)
getDistanceFromPoint(self, val, distFunc = lambda x1, x2: abs(x1-x2)
all((self.isLowerBoundClosed()
self.isUpperBoundClosed()
TypeError("Range is not closed")
self.contains(val)
min(distFunc(self.lowerCut.point, val)
distFunc(self.upperCut.point, val)
getDistanceFromRange(self, other, distFunc = lambda x1,x2: abs(x1-x2)
isinstance(other, Range)
TypeError("other is not a Range")
all((self.isLowerBoundClosed()
self.isUpperBoundClosed()
other.isLowerBoundClosed()
other.isUpperBoundClosed()
TypeError("Not all Ranges closed")
self.isConnected(other)
min(distFunc(self.lowerCut.point, other.upperCut.point)
distFunc(other.lowerCut.point, self.upperCut.point)
hasLowerBound(self)
return (not self.lowerCut.belowAll)
hasUpperBound(self)
return (not self.upperCut.aboveAll)
lowerEndpoint(self)
TypeError("Range unbounded below")
upperEndpoint(self)
TypeError("Range unbounded above")
isLowerBoundClosed(self)
TypeError("Range unbounded below")
isUpperBoundClosed(self)
TypeError("Range unbounded above")
return (not self.upperCut.below)
isEmpty(self)
encloses(self, other)
encloses (3,6)
enclose (3,6)
isinstance(other, Range)
ValueError("Range required")
return ((self.lowerCut <= other.lowerCut)
isConnected(self, other)
a (possibly empty)
and (5,10)
a (possibly empty)
isinstance(other, Range)
ValueError("Range required")
return ((self.lowerCut <= other.upperCut)
intersection(self, other)
isinstance(other, Range)
ValueError("Range required")
if ((self.lowerCut >= other.lowerCut)
Range(self.lowerCut, self.upperCut)
elif ((self.lowerCut <= other.lowerCut)
Range(other.lowerCut, other.upperCut)
if (self.lowerCut >= other.lowerCut)
if (self.upperCut <= other.upperCut)
Range(newLower, newUpper)
span(self, other)
if ((self.lowerCut <= other.lowerCut)
Range(self.lowerCut, self.upperCut)
elif ((self.lowerCut >= other.lowerCut)
Range(other.lowerCut, other.upperCut)
if (self.lowerCut <= other.lowerCut)