Conversation
e0f02f0 to
64bd5a9
Compare
This comment has been minimized.
This comment has been minimized.
64bd5a9 to
72ba487
Compare
launchable/test_runners/pytest.py
Outdated
| # | ||
|
|
||
|
|
||
| def _ts_to_iso(ts: Optional[float]) -> Optional[str]: |
There was a problem hiding this comment.
“ts” might be a bit unclear, so let’s avoid abbreviating it.
| # convert to ISO-8601 formatted date | ||
| if ts is None: | ||
| return None | ||
| return datetime.fromtimestamp(ts, tz=timezone.utc).isoformat() |
There was a problem hiding this comment.
Q: Is the timezone always UTC? Not local time zone of the environment??
There was a problem hiding this comment.
Question is can one test run in a runner in one time zone and another on runner in a different time zone ?
If yes then we will need a single source of truth to calculate durations and elapsed time
Also many other related files in repo have datetime.datetime.now(datetime.timezone.utc).isoformat().
But we can change here, if needed.
There was a problem hiding this comment.
OK, if any problem occurre, then let's consider it.
You can ignore my comment
launchable/test_runners/pytest.py
Outdated
| props = None | ||
|
|
||
| # extract raw timestamps | ||
| start_ts = data.get("start") |
There was a problem hiding this comment.
I think start_timestamp, stop_timestamp, start_timestamp_iso_format and end_timestamp_iso_format are better.
There isn't any strict rule for naming but we generally don’t use many abbreviations.
It should be fine within a method with a limited scope, though.
There was a problem hiding this comment.
Will change, no issues
74f1795 to
4c1d96b
Compare
4c1d96b to
a321642
Compare
AIENG-304: The customer interprets test execution time as elapsed time, whereas internally we treat execution time as workload time. This change introduces elapsed time measurement to close that gap in understanding.