Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Rest Server] Add launched time for job #4301

Merged
merged 2 commits into from
Mar 19, 2020
Merged

Conversation

abuccts
Copy link
Member

@abuccts abuccts commented Mar 19, 2020

Add launched time for job.

Closes #4295.
Resolves #3249

Add launched time for job.
appProgress: completionStatus ? 1 : 0,
appTrackingUrl: '',
appLaunchedTime: new Date(framework.metadata.creationTimestamp).getTime(),
appCompletedTime: new Date(framework.status.completionTime).getTime(),
appLaunchedTime: new Date(attemptStatus.runTime || attemptStatus.completionTime).getTime(),
Copy link
Member

Choose a reason for hiding this comment

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

Also update related doc for appLaunchedTime.

For a job attempt:
WholeDuration = CompletionTime - StartTime
RunningDuration = CompletionTime - LaunchedTime
WaitingDuration = WholeDuration - RunningDuration

For the whole job which may have multiple attempts:
WholeDuration = CompletionTime - StartTime
RunningTime = Sum_all_attempts (CompletionTime - LaunchedTime)
WaitingDuration = WholeDuration - RunningDuration

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Add docs for duration.
@abuccts abuccts merged commit b02f16b into master Mar 19, 2020
@abuccts abuccts deleted the xiongyf/add-launched-time branch March 20, 2020 08:21
@abuccts
Copy link
Member Author

abuccts commented Apr 22, 2020

Test cases:

  • submit a sleep 1s job, check whether appLaunchedTime equals to appCompletedTime
  • submit a sleep 10m job, check whether appLaunchedTime equals to appCompletedTime - 10m

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants