[
https://issues.apache.org/jira/browse/MINIFI-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553371#comment-16553371
]
ASF GitHub Bot commented on MINIFI-461:
---------------------------------------
Github user alopresto commented on a diff in the pull request:
https://github.com/apache/nifi-minifi/pull/133#discussion_r204543781
--- Diff:
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java
---
@@ -152,7 +152,9 @@ public void run() {
}
final long endTime = System.nanoTime();
- logger.info("Controller initialization took " + (endTime -
startTime) + " nanoseconds.");
+ final long durationNanos = endTime - startTime;
+ final long durationSeconds =
TimeUnit.SECONDS.convert(durationNanos, TimeUnit.NANOSECONDS);
+ logger.info("Controller initialization took {} nanoseconds ({}
seconds).", durationNanos, durationSeconds);
--- End diff --
This looks like it displays integer only. I think 1 significant digit of
decimal precision would be useful (`0.6 seconds` vs. `0 seconds`).
```
2018-07-23 13:29:10,774 INFO [main] org.apache.nifi.BootstrapListener
Successfully initiated communication with Bootstrap
2018-07-23 13:29:10,774 INFO [main] org.apache.nifi.minifi.MiNiFi
Controller initialization took 605462447 nanoseconds (0 seconds).
```
> Display application startup time in human-readable seconds
> ----------------------------------------------------------
>
> Key: MINIFI-461
> URL: https://issues.apache.org/jira/browse/MINIFI-461
> Project: Apache NiFi MiNiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 0.5.0
> Reporter: Andy LoPresto
> Assignee: Aldrin Piri
> Priority: Minor
> Labels: log, startup-time
>
> The application log should display the startup time similar to the way the
> Apache NiFi boot process now displays the startup time in both nanoseconds
> and human-readable seconds.
> {code}
> 2018-06-29 15:23:43,041 INFO [main] org.apache.nifi.minifi.MiNiFi Controller
> initialization took 546376888 nanoseconds.
> {code}
> Should become:
> {code}
> 2018-06-29 15:23:43,041 INFO [main] org.apache.nifi.minifi.MiNiFi Controller
> initialization took 546376888 nanoseconds (0.5 seconds).
> {code}
> This is easier for humans to understand when quickly looking at the logs.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)