From e8dd4f2fb9fd949fbeec07ec73e2947b0972fd69 Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 22 Jan 2013 18:39:12 +0800 Subject: [PATCH] =?UTF-8?q?#171=20Redis=E7=9A=84Benchmark=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B,=20=E5=AE=8C=E6=95=B4=E7=9A=84sessi?= =?UTF-8?q?on=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springside/modules/test/benchmark/BenchmarkTask.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkTask.java b/modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkTask.java index 6f717e9f..ec8c3562 100644 --- a/modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkTask.java +++ b/modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkTask.java @@ -8,14 +8,13 @@ import com.google.common.util.concurrent.RateLimiter; public abstract class BenchmarkTask implements Runnable { protected int threadIndex; + protected BenchmarkBase parent; - protected Date startTime; - + //use for print info// protected RateLimiter rateLimiter; protected int printInfoInterval; //单位为秒. protected long previous = 0L; - - protected BenchmarkBase parent; + protected Date startTime; public BenchmarkTask(int threadIndex, BenchmarkBase parent, int printInfoInterval) { this.threadIndex = threadIndex; @@ -49,7 +48,7 @@ public abstract class BenchmarkTask implements Runnable { } /** - * 间隔printInfoInterval的时间打印信息。 + * 每间隔printInfoInterval的时间打印信息ã? */ protected void printInfo(int current) { if (rateLimiter.tryAcquire()) {