From eb64661216456047f4d718de1050e6a3b3deab55 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 22 Dec 2008 19:37:58 +0000 Subject: [PATCH] LUCENE-1495: fix TaskSequence.toString to show time-limited configuration git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@728751 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/benchmark/byTask/tasks/TaskSequence.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java index 205f529ad49..8e0b6caf10d 100644 --- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java +++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java @@ -19,6 +19,7 @@ package org.apache.lucene.benchmark.byTask.tasks; import java.util.ArrayList; import java.util.Iterator; +import java.text.NumberFormat; import org.apache.lucene.benchmark.byTask.PerfRunData; import org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException; @@ -277,10 +278,11 @@ public class TaskSequence extends PerfTask { } sb.append(padd); sb.append(!letChildReport ? ">" : (parallel ? "]" : "}")); - if (repetitions>1) { + if (fixedTime) { + sb.append(" " + NumberFormat.getNumberInstance().format(runTimeSec) + "s"); + } else if (repetitions>1) { sb.append(" * " + repetitions); - } - if (repetitions==REPEAT_EXHAUST) { + } else if (repetitions==REPEAT_EXHAUST) { sb.append(" * EXHAUST"); } if (rate>0) {