File tree Expand file tree Collapse file tree 1 file changed +22
-20
lines changed
site/frontend/src/pages/status Expand file tree Collapse file tree 1 file changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -122,32 +122,34 @@ function ExpectedCurrentRequestCompletion() {
122122
123123 const now = new Date ();
124124 const diffSeconds = differenceInSeconds (estimatedCompleted , now );
125- const prettyDisplay = formatSecondsAsDuration (diffSeconds );
126125
126+ let expectedEnd: string ;
127+ if (diffSeconds >= 0 ) {
128+ let remainingSeconds = formatSecondsAsDuration (diffSeconds );
129+ expectedEnd = ` expected to end in approximately ${remainingSeconds } ` ;
130+ } else {
131+ expectedEnd = " is running longer than expected" ;
132+ }
133+
134+ let kind = " PR" ;
135+ let link;
127136 if (req .requestType === " Release" ) {
128- return (
129- <span >
130- Current Benchmark for{ " " }
131- <strong >
132- <CommitSha tag = { req .tag } ></CommitSha >
133- </strong >{ " " }
134- expected to end in approximately { prettyDisplay }
135- </span >
136- );
137+ link = <CommitSha tag = { req .tag } ></CommitSha >;
138+ kind = " " ;
137139 } else {
138140 const url = ` https://github.com/rust-lang/rust/pull/${req .pr } ` ;
139- return (
140- <span >
141- Current Benchmark for PR{ " " }
142- <strong >
143- <a href = { url } target = " _blank" >
144- #{ req .pr }
145- </a >{ " " }
146- </strong >
147- expected to end in approximately { prettyDisplay }
148- </span >
141+ link = (
142+ <a href = { url } target = " _blank" >
143+ #{ req .pr }
144+ </a >
149145 );
150146 }
147+
148+ return (
149+ <span >
150+ Current benchmark for { kind } <strong >{ link } </strong > { expectedEnd } .
151+ </span >
152+ );
151153}
152154
153155function PullRequestLink({request }: {request: BenchmarkRequest }) {
You can’t perform that action at this time.
0 commit comments