[
https://issues.apache.org/jira/browse/AVRO-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672843#comment-16672843
]
ASF GitHub Bot commented on AVRO-2251:
--------------------------------------
dkulp closed pull request #365: AVRO-2251 part 2: Allow changes to COUNT and
CYCLES via system properties.
URL: https://github.com/apache/avro/pull/365
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/lang/java/ipc/src/test/java/org/apache/avro/io/Perf.java
b/lang/java/ipc/src/test/java/org/apache/avro/io/Perf.java
index ea6c4d34f..8f525b4cd 100644
--- a/lang/java/ipc/src/test/java/org/apache/avro/io/Perf.java
+++ b/lang/java/ipc/src/test/java/org/apache/avro/io/Perf.java
@@ -52,8 +52,10 @@
* Avro encoding and decoding.
*/
public class Perf {
- private static final int COUNT = 250000; // needs to be a multiple of 4
- private static final int CYCLES = 800;
+ private static final int COUNT // needs to be a multiple of 4
+ =
Integer.parseInt(System.getProperty("org.apache.avro.io.perf.count","250000"));
+ private static final int CYCLES
+ =
Integer.parseInt(System.getProperty("org.apache.avro.io.perf.cycles","800"));
/**
* Use a fixed value seed for random number generation
@@ -166,6 +168,11 @@ private static void usage() {
}
public static void main(String[] args) throws Exception {
+ if (0 != (COUNT % 4)) {
+ System.out.println("Property 'org.apache.avro.io.perf.count' must be a
multiple of 4.");
+ System.exit(1);
+ }
+
List<Test> tests = new ArrayList<>();
boolean writeTests = true;
boolean readTests = true;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Modify Perf.java to better support automation scripts
> -----------------------------------------------------
>
> Key: AVRO-2251
> URL: https://issues.apache.org/jira/browse/AVRO-2251
> Project: Avro
> Issue Type: Test
> Reporter: Raymie Stata
> Assignee: Raymie Stata
> Priority: Major
> Fix For: 1.9.0
>
>
> To better support automated performance-test suites, this patch proposes two
> new arguments to the 'Perf.java' command-line tool:
> The `-o' argument gives 'Perf.java' the name of a file that should get the
> results of the run. Currently, Perf.java sends output to System.out – but if
> 'Perf.java' is invoked using Maven, which is the easiest way to invoke it,
> then System.out is polluted with a bunch of other output. Redirecting
> 'Perf.java' output metrics to a file makes it easier for automation scripts
> to process those metrics.
> The `-c [spec]` argument tells 'Perf.java' to generate a comma-separated
> output. By default, all benchmark metrics are output, but the optional
> `spec` argument can be used to indicate exactly which metrics should be
> included in the CSV output. The default output of 'Perf.java' is optimized
> for human inspection – for example, it includes the text "ms" in the
> running-time column so humans will understand the units of the running-time
> metric. The `-c` option will tell 'Perf.java' to generate machine-optimized
> output that is easier to consume by automation scripts.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)