Skip to content

Commit 0b5e37a

Browse files
committed
document Metric class
1 parent 7129495 commit 0b5e37a

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

pypop/metrics/metricset.py

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,42 @@
1818

1919

2020
class Metric:
21+
"""Individual performance metrics to be used within a metricset. Defines metric name,
22+
properties and method of calculation.
2123
"""
22-
freq_corr: bool
23-
Correct performance metrics based on average clock frequency (use to
24-
correct for node dynamic clocking issues).
25-
"""
2624

27-
def __init__(self, key, level, displayname=None, desc=None, is_inefficiency=False):
25+
def __init__(
26+
self,
27+
key,
28+
level,
29+
displayname=None,
30+
desc=None,
31+
is_inefficiency=False,
32+
freq_corr=False,
33+
):
34+
"""
35+
Parameters
36+
----------
37+
key: str
38+
Key by which to identify metric.
39+
40+
level: int
41+
Level at which to display metric in the stack.
42+
43+
displayname: str or None
44+
Display name to use for metric in table etc. Defaults to key.
45+
46+
desc: str or None
47+
Detailed description of the metric.
48+
49+
is_inefficiency: bool
50+
Tag metric as an inefficiency (rather than efficiency) for correct display
51+
and shading. Default False.
52+
53+
freq_corr: bool
54+
Correct performance metrics based on average clock frequency (use to
55+
correct for node dynamic clocking issues). Default False.
56+
"""
2857
self.key = key
2958
self.level = level
3059
self.description = str(desc) if desc else ""

0 commit comments

Comments
 (0)