Mercurial > hg > Database > Alice
changeset 655:1c93e82e05c6 default tip
fix timestamp
author | suruga |
---|---|
date | Sat, 17 Feb 2018 00:33:00 +0900 |
parents | 2fbd6ac705df |
children | |
files | src/main/java/alice/topology/manager/ConfigWaiter.java src/main/java/alice/topology/manager/StartTopologyManager.java src/main/java/alice/topology/manager/TopologyFinish.java src/main/java/alice/topology/manager/TopologyManagerConfig.java |
diffstat | 4 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/topology/manager/ConfigWaiter.java Fri Feb 09 19:48:43 2018 +0900 +++ b/src/main/java/alice/topology/manager/ConfigWaiter.java Sat Feb 17 00:33:00 2018 +0900 @@ -20,6 +20,7 @@ count--; if (count == 0) { ods.put("local", "start", ValueFactory.createNilValue()); + ods.put("startTime",System.currentTimeMillis()); ods.update("running", true); return; }
--- a/src/main/java/alice/topology/manager/StartTopologyManager.java Fri Feb 09 19:48:43 2018 +0900 +++ b/src/main/java/alice/topology/manager/StartTopologyManager.java Sat Feb 17 00:33:00 2018 +0900 @@ -114,6 +114,8 @@ TopologyFinish cs2 = new TopologyFinish(); cs2.finish.setKey("local", "finish"); + cs2.config.setKey("config"); + cs2.startTime.setKey("startTime"); } }
--- a/src/main/java/alice/topology/manager/TopologyFinish.java Fri Feb 09 19:48:43 2018 +0900 +++ b/src/main/java/alice/topology/manager/TopologyFinish.java Sat Feb 17 00:33:00 2018 +0900 @@ -6,8 +6,15 @@ public class TopologyFinish extends CodeSegment { public Receiver finish = ids.create(CommandType.TAKE); + public Receiver config = ids.create(CommandType.PEEK); + public Receiver startTime = ids.create(CommandType.TAKE); @Override public void run() { + TopologyManagerConfig conf = config.asClass(TopologyManagerConfig.class); + long start = startTime.asClass(Long.class); + if (conf.showTime) { + System.out.println("TopologymanagerTime = "+ (System.currentTimeMillis()-start)); + } System.exit(0); }
--- a/src/main/java/alice/topology/manager/TopologyManagerConfig.java Fri Feb 09 19:48:43 2018 +0900 +++ b/src/main/java/alice/topology/manager/TopologyManagerConfig.java Sat Feb 17 00:33:00 2018 +0900 @@ -4,6 +4,7 @@ public class TopologyManagerConfig extends Config { + public boolean showTime = false; public String confFilePath; public boolean dynamic = false; public TopologyType type = TopologyType.Tree; @@ -21,6 +22,8 @@ } } else if ("--Child".equals(args[i])) { hasChild = Integer.parseInt(args[++i]); + } else if ("--showTime".equals(args[i])) { + showTime = true; } }