keith-turner commented on PR #4890: URL: https://github.com/apache/accumulo/pull/4890#issuecomment-2354162804
> I think this might supersede https://github.com/apache/accumulo/pull/4742 Yeah I think it does. Looking at #4742 there was a comment about performance test. Wrote up the following test and ran against this PR and 3.1. Seeing these changes run around 3 times faster than 3.1. The code below will go through a Duration obj internally, but will not create it for each call. So these changes should provide duration objs and be much faster than what currently exists. ```java public class PerfTest { public static void main(String[] args) { ConfigurationCopy config = new ConfigurationCopy(DefaultConfiguration.getInstance()); var durationProps = Arrays.stream(Property.values()) .filter(property -> property.getType() == PropertyType.TIMEDURATION) .collect(Collectors.toUnmodifiableList()); final int iterations = 100000; for(int i = 0; i<100;i++) { long sum = 0; var timer = Timer.startNew(); for(int j = 0; j<iterations;j++) { for (var prop : durationProps) { sum += config.getTimeInMillis(prop); } } var time = timer.elapsed(TimeUnit.MICROSECONDS); System.out.printf("%d %f\n", sum, (durationProps.size() * iterations)/(double)time); } } } ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
