Skip to content

Comments

AIENG-304 Determining elapsed time #1236

Merged
mnanda-cloudbees merged 2 commits intov1from
AIENG-304-elapsed-time
Feb 18, 2026
Merged

AIENG-304 Determining elapsed time #1236
mnanda-cloudbees merged 2 commits intov1from
AIENG-304-elapsed-time

Conversation

@mnanda-cloudbees
Copy link

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.

@mnanda-cloudbees mnanda-cloudbees force-pushed the AIENG-304-elapsed-time branch 2 times, most recently from e0f02f0 to 64bd5a9 Compare February 11, 2026 08:53
@launchable-app

This comment has been minimized.

#


def _ts_to_iso(ts: Optional[float]) -> Optional[str]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“ts” might be a bit unclear, so let’s avoid abbreviating it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

# convert to ISO-8601 formatted date
if ts is None:
return None
return datetime.fromtimestamp(ts, tz=timezone.utc).isoformat()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Is the timezone always UTC? Not local time zone of the environment??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, if any problem occurre, then let's consider it.
You can ignore my comment

props = None

# extract raw timestamps
start_ts = data.get("start")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change, no issues

@mnanda-cloudbees mnanda-cloudbees force-pushed the AIENG-304-elapsed-time branch 2 times, most recently from 74f1795 to 4c1d96b Compare February 16, 2026 10:50
Copy link
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mnanda-cloudbees mnanda-cloudbees marked this pull request as ready for review February 18, 2026 14:33
@mnanda-cloudbees mnanda-cloudbees merged commit 9d04fa6 into v1 Feb 18, 2026
13 checks passed
@mnanda-cloudbees mnanda-cloudbees deleted the AIENG-304-elapsed-time branch February 18, 2026 18:47
This was referenced Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants