You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2016/01/05 22:51:45 UTC
svn commit: r1723180 -
/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
Author: sebb
Date: Tue Jan 5 21:51:45 2016
New Revision: 1723180
URL: http://svn.apache.org/viewvc?rev=1723180&view=rev
Log:
Constant static field names should be uppercase
Modified:
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java?rev=1723180&r1=1723179&r2=1723180&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java Tue Jan 5 21:51:45 2016
@@ -82,8 +82,7 @@ public class ExternalSampleSorter extend
private static final String MUST_NOT_BE_NULL = "%s must not be null";
- private static final Logger log = LoggerFactory
- .getLogger(ExternalSampleSorter.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ExternalSampleSorter.class);
private static final int DEFAULT_CHUNK_SIZE = 50000;
@@ -303,14 +302,14 @@ public class ExternalSampleSorter extend
if (!samples.isEmpty()) {
chunks.add(sortAndDump(samples, sampleMetadata));
}
- if (log.isDebugEnabled()) {
- log.debug("sort(): " + inputSampleCount.longValue()
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("sort(): " + inputSampleCount.longValue()
+ " samples read from input, " + chunkedSampleCount.longValue()
+ " samples written to chunk files");
if (inputSampleCount.get() != chunkedSampleCount.get()) {
- log.error("Failure! Number of samples read from input and written to chunk files differ");
+ LOG.error("Failure! Number of samples read from input and written to chunk files differ");
} else {
- log.info("dumping of samples chunk succeeded.");
+ LOG.info("dumping of samples chunk succeeded.");
}
}
super.setProducedMetadata(sampleMetadata, 0);
@@ -326,8 +325,8 @@ public class ExternalSampleSorter extend
private File sortAndDump(final List<Sample> samples,
final SampleMetadata sampleMetadata) {
long start = 0;
- if (log.isDebugEnabled()) {
- log.debug("sortAndDump(): Sorting " + samples.size()
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("sortAndDump(): Sorting " + samples.size()
+ " samples...");
start = System.currentTimeMillis();
}
@@ -336,13 +335,13 @@ public class ExternalSampleSorter extend
throw new SampleException("sort failed ! " + sortedSamples.size()
+ " != " + samples.size());
}
- if (log.isDebugEnabled()) {
- log.debug("sortAndDump(): in " + (System.currentTimeMillis() - start) / 1000f
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("sortAndDump(): in " + (System.currentTimeMillis() - start) / 1000f
+ " s. Sorted " + samples.size() + " samples.");
}
File out = getChunkFile();
- if (log.isDebugEnabled()) {
- log.debug("sortAndDump(): Dumping chunk " + out);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("sortAndDump(): Dumping chunk " + out);
start = System.currentTimeMillis();
}
try (CsvSampleWriter csvWriter = new CsvSampleWriter(out, sampleMetadata)){
@@ -351,8 +350,8 @@ public class ExternalSampleSorter extend
chunkedSampleCount.incrementAndGet();
}
}
- if (log.isDebugEnabled()) {
- log.debug("sortAndDump(): in " + (System.currentTimeMillis() - start) / 1000f
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("sortAndDump(): in " + (System.currentTimeMillis() - start) / 1000f
+ " s : Dumped chunk " + out.getAbsolutePath());
}
return out;
Re: svn commit: r1723180 - /jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
Posted by sebb <se...@gmail.com>.
On 6 January 2016 at 05:41, Felix Schumacher
<fe...@internetallee.de> wrote:
>
>
> Am 5. Januar 2016 22:51:45 MEZ, schrieb sebb@apache.org:
>>Author: sebb
>>Date: Tue Jan 5 21:51:45 2016
>>New Revision: 1723180
>>
>>URL: http://svn.apache.org/viewvc?rev=1723180&view=rev
>>Log:
>>Constant static field names should be uppercase
>>
>>Modified:
>>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>>
>>Modified:
>>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>>URL:
>>http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java?rev=1723180&r1=1723179&r2=1723180&view=diff
>>==============================================================================
>>---
>>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>>(original)
>>+++
>>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>>Tue Jan 5 21:51:45 2016
>>@@ -82,8 +82,7 @@ public class ExternalSampleSorter extend
>>
>> private static final String MUST_NOT_BE_NULL = "%s must not be null";
>>
>>- private static final Logger log = LoggerFactory
>>- .getLogger(ExternalSampleSorter.class);
>>+ private static final Logger LOG =
>>LoggerFactory.getLogger(ExternalSampleSorter.class);
>
> There are many cases of lowercase log in other parts of jmeter code. Should we rename them also?
Not sure it's worth the effort; I did the above because it's new code.
> Felix
>
>>
>> private static final int DEFAULT_CHUNK_SIZE = 50000;
>>
>>@@ -303,14 +302,14 @@ public class ExternalSampleSorter extend
>> if (!samples.isEmpty()) {
>> chunks.add(sortAndDump(samples, sampleMetadata));
>> }
>>- if (log.isDebugEnabled()) {
>>- log.debug("sort(): " + inputSampleCount.longValue()
>>+ if (LOG.isDebugEnabled()) {
>>+ LOG.debug("sort(): " + inputSampleCount.longValue()
>> + " samples read from input, " + chunkedSampleCount.longValue()
>> + " samples written to chunk files");
>> if (inputSampleCount.get() != chunkedSampleCount.get()) {
>>- log.error("Failure! Number of samples read from input
>>and written to chunk files differ");
>>+ LOG.error("Failure! Number of samples read from input
>>and written to chunk files differ");
>> } else {
>>- log.info("dumping of samples chunk succeeded.");
>>+ LOG.info("dumping of samples chunk succeeded.");
>> }
>> }
>> super.setProducedMetadata(sampleMetadata, 0);
>>@@ -326,8 +325,8 @@ public class ExternalSampleSorter extend
>> private File sortAndDump(final List<Sample> samples,
>> final SampleMetadata sampleMetadata) {
>> long start = 0;
>>- if (log.isDebugEnabled()) {
>>- log.debug("sortAndDump(): Sorting " + samples.size()
>>+ if (LOG.isDebugEnabled()) {
>>+ LOG.debug("sortAndDump(): Sorting " + samples.size()
>> + " samples...");
>> start = System.currentTimeMillis();
>> }
>>@@ -336,13 +335,13 @@ public class ExternalSampleSorter extend
>> throw new SampleException("sort failed ! " + sortedSamples.size()
>> + " != " + samples.size());
>> }
>>- if (log.isDebugEnabled()) {
>>- log.debug("sortAndDump(): in " +
>>(System.currentTimeMillis() - start) / 1000f
>>+ if (LOG.isDebugEnabled()) {
>>+ LOG.debug("sortAndDump(): in " +
>>(System.currentTimeMillis() - start) / 1000f
>> + " s. Sorted " + samples.size() + " samples.");
>> }
>> File out = getChunkFile();
>>- if (log.isDebugEnabled()) {
>>- log.debug("sortAndDump(): Dumping chunk " + out);
>>+ if (LOG.isDebugEnabled()) {
>>+ LOG.debug("sortAndDump(): Dumping chunk " + out);
>> start = System.currentTimeMillis();
>> }
>>try (CsvSampleWriter csvWriter = new CsvSampleWriter(out,
>>sampleMetadata)){
>>@@ -351,8 +350,8 @@ public class ExternalSampleSorter extend
>> chunkedSampleCount.incrementAndGet();
>> }
>> }
>>- if (log.isDebugEnabled()) {
>>- log.debug("sortAndDump(): in " +
>>(System.currentTimeMillis() - start) / 1000f
>>+ if (LOG.isDebugEnabled()) {
>>+ LOG.debug("sortAndDump(): in " +
>>(System.currentTimeMillis() - start) / 1000f
>> + " s : Dumped chunk " + out.getAbsolutePath());
>> }
>> return out;
>
Re: svn commit: r1723180 - /jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 5. Januar 2016 22:51:45 MEZ, schrieb sebb@apache.org:
>Author: sebb
>Date: Tue Jan 5 21:51:45 2016
>New Revision: 1723180
>
>URL: http://svn.apache.org/viewvc?rev=1723180&view=rev
>Log:
>Constant static field names should be uppercase
>
>Modified:
>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>
>Modified:
>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>URL:
>http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java?rev=1723180&r1=1723179&r2=1723180&view=diff
>==============================================================================
>---
>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>(original)
>+++
>jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
>Tue Jan 5 21:51:45 2016
>@@ -82,8 +82,7 @@ public class ExternalSampleSorter extend
>
> private static final String MUST_NOT_BE_NULL = "%s must not be null";
>
>- private static final Logger log = LoggerFactory
>- .getLogger(ExternalSampleSorter.class);
>+ private static final Logger LOG =
>LoggerFactory.getLogger(ExternalSampleSorter.class);
There are many cases of lowercase log in other parts of jmeter code. Should we rename them also?
Felix
>
> private static final int DEFAULT_CHUNK_SIZE = 50000;
>
>@@ -303,14 +302,14 @@ public class ExternalSampleSorter extend
> if (!samples.isEmpty()) {
> chunks.add(sortAndDump(samples, sampleMetadata));
> }
>- if (log.isDebugEnabled()) {
>- log.debug("sort(): " + inputSampleCount.longValue()
>+ if (LOG.isDebugEnabled()) {
>+ LOG.debug("sort(): " + inputSampleCount.longValue()
> + " samples read from input, " + chunkedSampleCount.longValue()
> + " samples written to chunk files");
> if (inputSampleCount.get() != chunkedSampleCount.get()) {
>- log.error("Failure! Number of samples read from input
>and written to chunk files differ");
>+ LOG.error("Failure! Number of samples read from input
>and written to chunk files differ");
> } else {
>- log.info("dumping of samples chunk succeeded.");
>+ LOG.info("dumping of samples chunk succeeded.");
> }
> }
> super.setProducedMetadata(sampleMetadata, 0);
>@@ -326,8 +325,8 @@ public class ExternalSampleSorter extend
> private File sortAndDump(final List<Sample> samples,
> final SampleMetadata sampleMetadata) {
> long start = 0;
>- if (log.isDebugEnabled()) {
>- log.debug("sortAndDump(): Sorting " + samples.size()
>+ if (LOG.isDebugEnabled()) {
>+ LOG.debug("sortAndDump(): Sorting " + samples.size()
> + " samples...");
> start = System.currentTimeMillis();
> }
>@@ -336,13 +335,13 @@ public class ExternalSampleSorter extend
> throw new SampleException("sort failed ! " + sortedSamples.size()
> + " != " + samples.size());
> }
>- if (log.isDebugEnabled()) {
>- log.debug("sortAndDump(): in " +
>(System.currentTimeMillis() - start) / 1000f
>+ if (LOG.isDebugEnabled()) {
>+ LOG.debug("sortAndDump(): in " +
>(System.currentTimeMillis() - start) / 1000f
> + " s. Sorted " + samples.size() + " samples.");
> }
> File out = getChunkFile();
>- if (log.isDebugEnabled()) {
>- log.debug("sortAndDump(): Dumping chunk " + out);
>+ if (LOG.isDebugEnabled()) {
>+ LOG.debug("sortAndDump(): Dumping chunk " + out);
> start = System.currentTimeMillis();
> }
>try (CsvSampleWriter csvWriter = new CsvSampleWriter(out,
>sampleMetadata)){
>@@ -351,8 +350,8 @@ public class ExternalSampleSorter extend
> chunkedSampleCount.incrementAndGet();
> }
> }
>- if (log.isDebugEnabled()) {
>- log.debug("sortAndDump(): in " +
>(System.currentTimeMillis() - start) / 1000f
>+ if (LOG.isDebugEnabled()) {
>+ LOG.debug("sortAndDump(): in " +
>(System.currentTimeMillis() - start) / 1000f
> + " s : Dumped chunk " + out.getAbsolutePath());
> }
> return out;