mirror of
https://github.com/RAIRLab/Spectra.git
synced 2024-11-21 00:16:30 -05:00
Added timing code
This commit is contained in:
parent
13b3879630
commit
f44c75e3a6
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,7 @@ public final class Runner {
|
|||
|
||||
for (PlanningProblem planningProblem : planningProblemList) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
Set<Plan> plans = astarplanner.plan(
|
||||
planningProblem.getBackground(),
|
||||
planningProblem.getActions(),
|
||||
|
@ -57,9 +58,11 @@ public final class Runner {
|
|||
planningProblem.getGoal(),
|
||||
ConstantHeuristic::h
|
||||
);
|
||||
long end = System.currentTimeMillis();
|
||||
|
||||
if(plans.size() > 0) {
|
||||
System.out.println(plans.toString());
|
||||
System.out.println("Time (ms): " + (end - start));
|
||||
}
|
||||
else {
|
||||
System.out.println("FAILED");
|
||||
|
|
Loading…
Reference in a new issue