activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelandrepearce <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1605: ARTEMIS-1476 HdrHistogram support on ve...
Date Thu, 26 Oct 2017 15:23:33 GMT
Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1605#discussion_r147177271
  
    --- Diff: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
---
    @@ -55,32 +78,30 @@ public static long syncTest(File datafolder,
                                    int maxAIO,
                                    JournalType journalType) throws Exception {
           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 (verbose) {
              System.out.println("Using " + factory.getClass().getName() + " to calculate
sync times, alignment=" + factory.getAlignment());
           }
           SequentialFile file = factory.createSequentialFile(fileName);
    -
    +      //to be sure that a process/thread crash won't leave the dataFolder with garbage
files
    +      file.getJavaFile().deleteOnExit();
           try {
    +         final ByteBuffer bufferBlock = allocateAlignedBlock(blockSize, factory);
    +
    +         final int alignedBlockSize = bufferBlock.remaining();
    +
              file.delete();
              file.open();
     
    -         file.fill(blockSize * blocks);
    +         file.fill(alignedBlockSize * blocks);
     
              file.close();
     
              long[] result = new long[tries];
     
    -         byte[] block = new byte[blockSize];
    --- End diff --
    
    Why is this being removed? 


---

Mime
View raw message