rtista commented on pull request #3365:
URL: https://github.com/apache/activemq-artemis/pull/3365#issuecomment-748693306
Hey @michaelandrepearce, after I developed the code I ran some arguably
worthy performance tests to the function. They are not e2e however. I simply
recorded the execution time of the function for one hundred million executions
and calculated the mean. Here's the code I used:
```java
int sum = 0;
final int TEST_TIMES = 100000000;
final String TEST_STRING = "address::queue";
long startTime;
long stopTime;
for (int i = 0 ; i < TEST_TIMES ; i++) {
startTime = System.nanoTime();
CompositeAddress.isFullyQualifiedOld(TEST_STRING);
stopTime = System.nanoTime();
sum += (stopTime - startTime);
}
System.out.println("Before FQQN Performance: " + (sum / TEST_TIMES));
sum = 0;
for (int i = 0 ; i < TEST_TIMES ; i++) {
startTime = System.nanoTime();
CompositeAddress.isFullyQualified(TEST_STRING);
stopTime = System.nanoTime();
sum += (stopTime - startTime);
}
System.out.println("After FQQN Performance: " + (sum / TEST_TIMES));
```
I executed this code for "address::queue", "::queue", "address::" and null
and here are the results:
| Test String | Before (ns) | After (ns) |
| :-------------: | :-------------: | :-------------: |
| "address::queue" | 20 ns | 20 ns |
| "::queue" | 19 ns | 19 ns |
| "address::" | 20 ns | 20 ns |
| null | 16 ns | 16 ns |
I understand however that these tests might not carry any real meaning to
you, but if you're able to direct me to an example of what you need I can
surely try to provide those results to you ;)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]