Skip to content

Commit

Permalink
Reorder properties go to the top
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Jun 18, 2018
1 parent 40e8841 commit 777ee88
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions rebench/model/run_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ def __init__(self, benchmark, cores, input_size, var_value):
self._cmdline = None
self._failed = True

def log(self):
msg = "Run Config: number of data points: %d" % self.get_number_of_data_points()
if self._benchmark.run_details.min_iteration_time:
msg += ", min_iteration_time: %dms" % self._benchmark.run_details.min_iteration_time
logging.debug(msg)

def requires_warmup(self):
return self._benchmark.run_details.warmup > 0

@property
def warmup_iterations(self):
return self._benchmark.run_details.warmup
Expand All @@ -66,6 +57,49 @@ def max_invocation_time(self):
def execute_exclusively(self):
return self._benchmark.run_details.execute_exclusively

@property
def benchmark(self):
return self._benchmark

@property
def cores(self):
return self._cores

@property
def input_size(self):
return self._input_size

@property
def cores_as_str(self):
return '' if self._cores is None else str(self._cores)

@property
def input_size_as_str(self):
return '' if self._input_size is None else str(self._input_size)

@property
def var_value_as_str(self):
return '' if self._var_value is None else str(self._var_value)

@property
def var_value(self):
return self._var_value

@property
def location(self):
if not self._benchmark.suite.location:
return None
return self._expand_vars(self._benchmark.suite.location)

def log(self):
msg = "Run Config: number of data points: %d" % self.get_number_of_data_points()
if self._benchmark.run_details.min_iteration_time:
msg += ", min_iteration_time: %dms" % self._benchmark.run_details.min_iteration_time
logging.debug(msg)

def requires_warmup(self):
return self._benchmark.run_details.warmup > 0

def fail_immediately(self):
self._termination_check.fail_immediately()

Expand Down Expand Up @@ -146,34 +180,6 @@ def run_failed(self):
self._termination_check.has_too_many_failures(
len(self._data_points)))

@property
def benchmark(self):
return self._benchmark

@property
def cores(self):
return self._cores

@property
def input_size(self):
return self._input_size

@property
def cores_as_str(self):
return '' if self._cores is None else str(self._cores)

@property
def input_size_as_str(self):
return '' if self._input_size is None else str(self._input_size)

@property
def var_value_as_str(self):
return '' if self._var_value is None else str(self._var_value)

@property
def var_value(self):
return self._var_value

def __hash__(self):
return hash(self.cmdline())

Expand Down Expand Up @@ -214,12 +220,6 @@ def cmdline(self):
self._cmdline = cmdline.strip()
return self._cmdline

@property
def location(self):
if not self._benchmark.suite.location:
return None
return self._expand_vars(self._benchmark.suite.location)

def __eq__(self, other):
return (isinstance(other, self.__class__) and
self.cmdline() == other.cmdline())
Expand Down

0 comments on commit 777ee88

Please sign in to comment.