File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/WebJobs.Script.WebHost Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ public async Task<IActionResult> GetHostStatus([FromServices] IScriptHostManager
75
75
State = scriptHostManager . State . ToString ( ) ,
76
76
Version = ScriptHost . Version ,
77
77
VersionDetails = Utility . GetInformationalVersion ( typeof ( ScriptHost ) ) ,
78
- Id = await hostIdProvider . GetHostIdAsync ( CancellationToken . None )
78
+ Id = await hostIdProvider . GetHostIdAsync ( CancellationToken . None ) ,
79
+ ProcessUptime = ( long ) ( DateTime . UtcNow - Process . GetCurrentProcess ( ) . StartTime ) . TotalMilliseconds
79
80
} ;
80
81
81
82
var lastError = scriptHostManager . LastError ;
Original file line number Diff line number Diff line change 1
1
// Copyright (c) .NET Foundation. All rights reserved.
2
2
// Licensed under the MIT License. See License.txt in the project root for license information.
3
3
4
+ using System ;
4
5
using System . Collections . ObjectModel ;
5
6
using Newtonsoft . Json ;
6
7
@@ -37,5 +38,11 @@ public class HostStatus
37
38
/// </summary>
38
39
[ JsonProperty ( PropertyName = "errors" , DefaultValueHandling = DefaultValueHandling . Ignore ) ]
39
40
public Collection < string > Errors { get ; set ; }
41
+
42
+ /// <summary>
43
+ /// Gets or sets the uptime of the process
44
+ /// </summary>
45
+ [ JsonProperty ( PropertyName = "processUptime" , DefaultValueHandling = DefaultValueHandling . Ignore ) ]
46
+ public long ProcessUptime { get ; set ; }
40
47
}
41
48
}
You can’t perform that action at this time.
0 commit comments