We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6cd2c2 commit 24551daCopy full SHA for 24551da
src/access/parsers/payujson_profiling.py
@@ -35,9 +35,26 @@ def __init__(self):
35
36
@property
37
def metrics(self) -> list:
38
+ """Implements "metrics" abstract method/property.
39
+
40
+ Returns:
41
+ list: the metric names captured by this parser.
42
+ """
43
return self._metrics
44
45
def read(self, stream: str) -> dict:
46
+ """Implements "read" abstract method to parse a JSON file generated by Payu.
47
48
+ Args:
49
+ stream (str): String containing valid JSON to be parsed.
50
51
52
+ dict: Parsed timing information.
53
54
+ Raises:
55
+ KeyError: when "timings" key is missing in input JSON.
56
+ ValueError: if stream is not a string with valid JSON.
57
58
59
try:
60
timings = json.loads(stream)["timings"]
0 commit comments