mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Added @ExportedBean for ResponseTimeMonitor
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13159 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
4761f77465
commit
dbcaa236dc
1 file changed
+4
@@ -13,6 +13,8 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Logger;
|
||||
import org.kohsuke.stapler.export.Exported;
|
||||
import org.kohsuke.stapler.export.ExportedBean;
|
||||
|
||||
/**
|
||||
* Monitors the round-trip response time to this slave.
|
||||
@@ -65,6 +67,7 @@ public class ResponseTimeMonitor extends NodeMonitor {
|
||||
/**
|
||||
* Immutable representation of the monitoring data.
|
||||
*/
|
||||
@ExportedBean
|
||||
public static final class Data {
|
||||
/**
|
||||
* Record of the past 5 times. -1 if time out. Otherwise in milliseconds.
|
||||
@@ -96,6 +99,7 @@ public class ResponseTimeMonitor extends NodeMonitor {
|
||||
/**
|
||||
* Computes the average response time, by taking the time out into account.
|
||||
*/
|
||||
@Exported
|
||||
public long average() {
|
||||
long total=0;
|
||||
for (long l : past5) {
|
||||
|
||||
Reference in new issue
Block a user