Skip to content

Commit

Permalink
Add some __repr__ methods for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr committed Aug 1, 2023
1 parent c3a5a0c commit 429fd1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rebench/model/data_point.py
Expand Up @@ -76,3 +76,6 @@ def measurements_as_dict(self, criteria):
'it': iteration,
'm': data
}

def __repr__(self):
return "DataPoint(" + str(self.run_id) + ", " + str(self._measurements) + ")"
3 changes: 3 additions & 0 deletions rebench/model/measurement.py
Expand Up @@ -71,3 +71,6 @@ def as_dict(self):
'u': self.unit,
'v': self.value
}

def __repr__(self):
return "Measurement(%s, %s, %s)" % (self.value, self.unit, self.criterion)

0 comments on commit 429fd1c

Please sign in to comment.