pgaref commented on a change in pull request #1650:
URL: https://github.com/apache/hive/pull/1650#discussion_r522950225
##########
File path:
common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java
##########
@@ -84,6 +86,18 @@ public void testVariations() {
TimestampTZUtil.parse("2017-05-08 07:45:00-3:00");
}
+ @Test
+ public void testPerformance() {
+ for (int i = 0; i < 100; i++) {
Review comment:
First loop redundant?
##########
File path:
common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java
##########
@@ -84,6 +86,18 @@ public void testVariations() {
TimestampTZUtil.parse("2017-05-08 07:45:00-3:00");
}
+ @Test
+ public void testPerformance() {
+ for (int i = 0; i < 100; i++) {
+ TimestampTZUtil.parse("2017-01-01 13:33:00", ZoneId.of("UTC"));
+ }
+ Stopwatch sw = Stopwatch.createStarted();
+ for (int i = 0; i < 10000; i++) {
+ TimestampTZUtil.parse("2017-01-01 13:33:00", ZoneId.of("UTC"));
Review comment:
Can we add some randomness on the parsed timestamp? Maybe use i as part
of 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]