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

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinmoris committed Nov 9, 2021
2 parents 293c551 + 40fc2df commit 10d5758
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/BuildStats/BuildHistoryCharts.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module BuildStatsHelper =
inclFromPullRequest || not build.FromPullRequest

let timeTaken (started : Nullable<DateTime>)
(finished : Nullable<DateTime>) =
(finished : Nullable<DateTime>) =
match started.HasValue with
| true ->
match finished.HasValue with
Expand All @@ -59,6 +59,7 @@ module BuildMetrics =
| 0 -> TimeSpan.Zero
| _ ->
builds
|> List.filter (fun b -> b.Status = Success)
|> List.maxBy (fun x -> x.TimeTaken.TotalMilliseconds)
|> fun x -> x.TimeTaken

Expand All @@ -67,6 +68,7 @@ module BuildMetrics =
| 0 -> TimeSpan.Zero
| _ ->
builds
|> List.filter (fun b -> b.Status = Success)
|> List.minBy (fun x -> x.TimeTaken.TotalMilliseconds)
|> fun x -> x.TimeTaken

Expand All @@ -75,6 +77,7 @@ module BuildMetrics =
| 0 -> TimeSpan.Zero
| _ ->
builds
|> List.filter (fun b -> b.Status = Success)
|> List.averageBy (fun x -> x.TimeTaken.TotalMilliseconds)
|> TimeSpan.FromMilliseconds

Expand Down

0 comments on commit 10d5758

Please sign in to comment.