提交 8d36bf04 编写于 作者: K kohsuke

bug fix

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13030 71c3de6d-444a-0410-be80-ed276b4c234a
上级 0484366d
......@@ -31,6 +31,8 @@ public class LoadMonitorImpl extends SafeTimerTask {
Trigger.timer.scheduleAtFixedRate(this,0,10*1000);
}
private String quote(Object s) { "\"${s}\""; }
protected void printHeaders() {
def headers = ["# of executors","# of busy executors","BuildableItems in Q","BuildableItem avg wait time"];
def data = ["timestamp"];
......@@ -40,14 +42,14 @@ public class LoadMonitorImpl extends SafeTimerTask {
for( String label : labels)
data += headers.collect { "${it} (${label}}" }
dataFile.append(data.collect({ "\"${it}\"" }).join(",")+"\n");
dataFile.append(data.collect({ quote(it) }).join(",")+"\n");
}
@Override
protected void doRun() {
def now = new Date();
def data = [];
data.add(FORMATTER.format(now));
data.add(quote(FORMATTER.format(now)));
def h = Hudson.getInstance();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册