提交 20b80cc6 编写于 作者: J Jesse Glick

Display classLoadingPrefetchCacheCount.

上级 8aed6623
......@@ -348,6 +348,18 @@ public class SlaveComputer extends Computer {
return channel.call(new LoadingCount(false));
}
/**
* Shows {@link Channel#classLoadingPrefetchCacheCount}.
* @return -1 in case that capability is not supported
* @since XXX prefetch-JENKINS-15120
*/
public int getClassLoadingPrefetchCacheCount() throws IOException, InterruptedException {
if (!channel.remoteCapability.supportsPrefetch()) {
return -1;
}
return channel.call(new LoadingPrefetchCacheCount());
}
/**
* Shows {@link Channel#resourceLoadingCount}.
* @since 1.495
......@@ -383,6 +395,12 @@ public class SlaveComputer extends Computer {
}
}
static class LoadingPrefetchCacheCount implements Callable<Integer,RuntimeException> {
@Override public Integer call() {
return Channel.current().classLoadingPrefetchCacheCount.get();
}
}
static class LoadingTime implements Callable<Long,RuntimeException> {
private final boolean resource;
LoadingTime(boolean resource) {
......
......@@ -10,7 +10,15 @@ table(class: 'bigtable') {
tr {
td _('Classes')
td(style: right) {text(fmt.format(my.classLoadingTime / 1000000000))}
td(style: right) {text(my.classLoadingCount)}
td(style: right) {
text(my.classLoadingCount)
def classLoadingPrefetchCacheCount = my.classLoadingPrefetchCacheCount;
if (classLoadingPrefetchCacheCount != -1) {
text(_(' (prefetch cache: '))
text(classLoadingPrefetchCacheCount)
text(_(')'))
}
}
}
tr {
td _('Resources')
......
......@@ -175,7 +175,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>remoting</artifactId>
<version>2.23</version>
<version>2.24-SNAPSHOT</version>
</dependency>
<dependency>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册