[
https://issues.apache.org/jira/browse/STORM-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15160245#comment-15160245
]
ASF GitHub Bot commented on STORM-1571:
---------------------------------------
Github user unsleepy22 commented on the pull request:
https://github.com/apache/storm/pull/1143#issuecomment-188099708
I agree with @darionyaphet . Actually I think all System.nanoTime callings
in external modules should be replaced with System.currentTimeMillis since they
use System.nanoTime to get a ns value and then convert the time back to ms,
which is unnecessary.
System.nanoTime should only be used in such cases that we do need high
precision timing, e.g., timing certain code snippets in metrics system. If
called on a critical path, this method is 5+ times slower than
System.currentTimeMillis.
> Improvment Kafka Spout Time Metric
> ----------------------------------
>
> Key: STORM-1571
> URL: https://issues.apache.org/jira/browse/STORM-1571
> Project: Apache Storm
> Issue Type: Improvement
> Components: storm-kafka
> Affects Versions: 0.9.3, 0.9.4, 0.9.5, 0.9.6
> Environment: Mac 10.11.1 JDK 1.8.0_40
> Reporter: darion yaphet
> Assignee: darion yaphet
> Priority: Minor
> Attachments: 0001-Improvment-Kafka-Spout-Time-Metric.patch,
> 0002-Update-time-interval-counting-on-TridentKafkaEmitter.patch
>
>
> Use System.currentTimeMillis() to calculation time interval is better than
> System.nanoTime()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)