Skip to content
Snippets Groups Projects
Commit 202f2fca authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Remove unneeded timer

parent 28a5dbdc
No related branches found
No related tags found
2 merge requests!185Clean up interfaces and unneeded code in memory core classes,!178Draft: Make RobotStateMemory ready
...@@ -91,17 +91,16 @@ namespace armarx::armem::server::robot_state ...@@ -91,17 +91,16 @@ namespace armarx::armem::server::robot_state
Update update = buildUpdate(batch); Update update = buildUpdate(batch);
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
auto endLock = start, endProprioception = start, endLocalization = start; auto endProprioception = start, endLocalization = start;
armem::CommitResult result; armem::CommitResult result;
{ {
endLock = std::chrono::high_resolution_clock::now(); // Commits lock the core segments.
// Commits locks the core segment. result = memory.commitLocking(update.proprioception);
result = memory.commit(update.proprioception);
endProprioception = std::chrono::high_resolution_clock::now(); endProprioception = std::chrono::high_resolution_clock::now();
localizationSegment.storeTransform(update.localization); localizationSegment.commitTransformLocking(update.localization);
endLocalization = std::chrono::high_resolution_clock::now(); endLocalization = std::chrono::high_resolution_clock::now();
} }
if (not result.allSuccess()) if (not result.allSuccess())
...@@ -113,8 +112,7 @@ namespace armarx::armem::server::robot_state ...@@ -113,8 +112,7 @@ namespace armarx::armem::server::robot_state
auto end = std::chrono::high_resolution_clock::now(); auto end = std::chrono::high_resolution_clock::now();
debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit [ms]", toDurationMs(start, end)); debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit [ms]", toDurationMs(start, end));
debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit Lock [ms]", toDurationMs(start, endLock)); debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit Proprioception [ms]", toDurationMs(start, endProprioception));
debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit Proprioception [ms]", toDurationMs(endLock, endProprioception));
debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit Localization [ms]", toDurationMs(endProprioception, endLocalization)); debugObserver->setDebugObserverDatafield("RobotStateWriter | t Commit Localization [ms]", toDurationMs(endProprioception, endLocalization));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment