correct timing of durations

This commit is contained in:
Dennis Luxen 2013-08-13 18:21:14 +02:00
parent c50b4c72d7
commit d7bd78d612

View File

@ -237,9 +237,10 @@ int main (int argc, char *argv[]) {
Contractor* contractor = new Contractor( edgeBasedNodeNumber, edgeBasedEdgeList ); Contractor* contractor = new Contractor( edgeBasedNodeNumber, edgeBasedEdgeList );
double contractionStartedTimestamp(get_timestamp()); double contractionStartedTimestamp(get_timestamp());
contractor->Run(); contractor->Run();
const double contraction_duration = (get_timestamp() - contractionStartedTimestamp);
SimpleLogger().Write() << SimpleLogger().Write() <<
"Contraction took " << "Contraction took " <<
(get_timestamp() - contractionStartedTimestamp) << contraction_duration <<
" sec"; " sec";
DeallocatingVector< QueryEdge > contractedEdgeList; DeallocatingVector< QueryEdge > contractedEdgeList;
@ -317,14 +318,15 @@ int main (int argc, char *argv[]) {
++usedEdgeCounter; ++usedEdgeCounter;
} }
} }
double endTime = (get_timestamp() - startupTime); SimpleLogger().Write() << "Preprocessing : " <<
(get_timestamp() - startupTime) << " seconds";
SimpleLogger().Write() << "Expansion : " << SimpleLogger().Write() << "Expansion : " <<
(nodeBasedNodeNumber/expansionHasFinishedTime) << " nodes/sec and " << (nodeBasedNodeNumber/expansionHasFinishedTime) << " nodes/sec and " <<
(edgeBasedNodeNumber/expansionHasFinishedTime) << " edges/sec"; (edgeBasedNodeNumber/expansionHasFinishedTime) << " edges/sec";
SimpleLogger().Write() << "Contraction: " << SimpleLogger().Write() << "Contraction: " <<
(edgeBasedNodeNumber/expansionHasFinishedTime) << " nodes/sec and " << (edgeBasedNodeNumber/contraction_duration) << " nodes/sec and " <<
usedEdgeCounter/endTime << " edges/sec"; usedEdgeCounter/contraction_duration << " edges/sec";
hsgr_output_stream.close(); hsgr_output_stream.close();
//cleanedEdgeList.clear(); //cleanedEdgeList.clear();
@ -333,7 +335,6 @@ int main (int argc, char *argv[]) {
} catch ( const std::exception &e ) { } catch ( const std::exception &e ) {
SimpleLogger().Write(logWARNING) << SimpleLogger().Write(logWARNING) <<
"Exception occured: " << e.what() << std::endl; "Exception occured: " << e.what() << std::endl;
return -1; return -1;
} }
return 0; return 0;