This commit is contained in:
Clebert Suconic 2018-09-13 15:46:51 -04:00
commit 51f4bf0f9e
4 changed files with 0 additions and 46 deletions

View File

@ -126,10 +126,6 @@
<artifactId>commons-lang3</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
</dependency>
<dependency>
<groupId>com.sun.winsw</groupId>
<artifactId>winsw</artifactId>

View File

@ -24,7 +24,6 @@ import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.HdrHistogram.Histogram;
import org.apache.activemq.artemis.core.io.IOCallback;
import org.apache.activemq.artemis.core.io.SequentialFile;
import org.apache.activemq.artemis.core.io.SequentialFileFactory;
@ -80,7 +79,6 @@ public class SyncCalculation {
SequentialFileFactory factory = newFactory(datafolder, fsync, journalType, blockSize * blocks, maxAIO);
final boolean asyncWrites = journalType == JournalType.ASYNCIO && !syncWrites;
//the write latencies could be taken only when writes are effectively synchronous
final Histogram writeLatencies = (verbose && !asyncWrites) ? new Histogram(MAX_FLUSH_NANOS, 2) : null;
if (journalType == JournalType.ASYNCIO && syncWrites) {
System.out.println();
@ -94,9 +92,6 @@ public class SyncCalculation {
if (verbose) {
System.out.println("Using " + factory.getClass().getName() + " to calculate sync times, alignment=" + factory.getAlignment());
if (writeLatencies == null) {
System.out.println("*** Use --sync-writes if you want to see a histogram for each write performed ***");
}
}
SequentialFile file = factory.createSequentialFile(fileName);
//to be sure that a process/thread crash won't leave the dataFolder with garbage files
@ -144,18 +139,11 @@ public class SyncCalculation {
bufferBlock.position(0);
latch.countUp();
long startWrite = 0;
if (writeLatencies != null) {
startWrite = System.nanoTime();
}
file.writeDirect(bufferBlock, true, callback);
if (syncWrites) {
flushLatch(latch);
}
if (writeLatencies != null) {
final long elapsedWriteNanos = System.nanoTime() - startWrite;
writeLatencies.recordValue(elapsedWriteNanos);
}
}
if (!syncWrites) flushLatch(latch);
@ -173,29 +161,10 @@ public class SyncCalculation {
}
file.close();
if (ntry == 0 && writeLatencies != null) {
writeLatencies.reset(); // discarding the first one.. some warmup time
}
}
factory.releaseDirectBuffer(bufferBlock);
if (writeLatencies != null) {
System.out.println("Write Latencies Percentile Distribution in microseconds");
//print latencies in us -> (ns * 1000d)
System.out.println("*****************************************************************");
writeLatencies.outputPercentileDistribution(System.out, 1000d);
System.out.println();
System.out.println("*****************************************************************");
System.out.println("*** this may be useful to generate charts if you like charts: ***");
System.out.println("*** http://hdrhistogram.github.io/HdrHistogram/plotFiles.html ***");
System.out.println("*****************************************************************");
System.out.println();
writeLatencies.reset();
}
long totalTime = Long.MAX_VALUE;
for (int i = 0; i < tries; i++) {
if (result[i] < totalTime) {

View File

@ -99,7 +99,6 @@
<include>org.jgroups:jgroups</include>
<include>org.apache.geronimo.specs:geronimo-json_1.0_spec</include>
<include>org.apache.johnzon:johnzon-core</include>
<include>org.hdrhistogram:HdrHistogram</include>
<include>javax.xml.bind:jaxb-api</include>
<include>com.sun.xml.bind:jaxb-impl</include>
<include>com.sun.xml.bind:jaxb-core</include>

10
pom.xml
View File

@ -82,7 +82,6 @@
<activemq5-version>5.14.5</activemq5-version>
<apache.derby.version>10.11.1.1</apache.derby.version>
<commons.beanutils.version>1.9.3</commons.beanutils.version>
<org.hdrhistogram.version>2.1.10</org.hdrhistogram.version>
<commons.collections.version>3.2.2</commons.collections.version>
<fuse.mqtt.client.version>1.14</fuse.mqtt.client.version>
<guava.version>19.0</guava.version>
@ -685,15 +684,6 @@
<!-- License: Apache 2.0 -->
</dependency>
<!-- needed by SyncCalculation -->
<!-- https://mvnrepository.com/artifact/org.hdrhistogram/HdrHistogram -->
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>${org.hdrhistogram.version}</version>
<!-- License: Public Domain -->
</dependency>
<!-- needed by artemis-selector -->
<dependency>
<groupId>xml-apis</groupId>