You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2017/01/11 12:21:39 UTC
opennlp git commit: OPENNLP-137: Add execution time to CLI command
line
Repository: opennlp
Updated Branches:
refs/heads/master 76ef2e675 -> 8bba18089
OPENNLP-137: Add execution time to CLI command line
This closes #44
Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo
Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/8bba1808
Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/8bba1808
Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/8bba1808
Branch: refs/heads/master
Commit: 8bba18089a1acf29f9d2433efc229d5c851f42b1
Parents: 76ef2e6
Author: Peter Thygesen <pe...@gmail.com>
Authored: Tue Jan 10 19:07:41 2017 +0100
Committer: J�rn Kottmann <jo...@apache.org>
Committed: Wed Jan 11 13:20:42 2017 +0100
----------------------------------------------------------------------
opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/opennlp/blob/8bba1808/opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java
----------------------------------------------------------------------
diff --git a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java
index cb103d2..eeaecc9 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CLI.java
@@ -205,6 +205,7 @@ public final class CLI {
System.exit(0);
}
+ final long startTime = System.currentTimeMillis();
String toolArguments[] = new String[args.length - 1];
System.arraycopy(args, 1, toolArguments, 0, toolArguments.length);
@@ -260,5 +261,8 @@ public final class CLI {
System.exit(e.getCode());
}
+
+ final long endTime = System.currentTimeMillis();
+ System.out.format("Execution time: %.3f seconds", (endTime - startTime) / 1000.0);
}
}