提交 dbcaa236 编写于 作者: D dvrzalik

Added @ExportedBean for ResponseTimeMonitor

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13159 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4761f774
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册