Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put timer into qnetsimengine and print the results to csv #1990

Closed
wants to merge 7 commits into from

Conversation

Janekdererste
Copy link
Member

@Janekdererste Janekdererste commented May 17, 2022

I try to measure the time the qsim needs to shuffle agents around. This measures the wallclocktime per timestep in different locations.

  • The overall wall clock time in QNetsimEngineWithThreadpool
  • The wall clock time divided by the number of links in QNetsimEngineWithThreadpool
  • The wall clock time divided by the number of nodes in QNetsimEngineWithThreadpool

The three items above are the times on the main thread. I.e. the overall time needed including the overhead for threading

Also measured the wall clock time for each worker for working on the links and on the nodes. This is the code in AbstractQNetsimEngineRunner. These times are also divided by number of nodes and number of links.

One should be able to compare the runtime per node/link between the overall code fom QNetsimEngineWithThreadpool and the worker Threads from AbstractQNetsimEngineRunner like below (numbers are nano seconds)

grafik
grafik

@Janekdererste Janekdererste requested a review from michaz May 17, 2022 15:03
I don't know whether this is important, but I want to try not to introduce slowdowns when attempting to measure speed.
@@ -46,9 +58,15 @@ public Boolean call() {
}

if (this.movingNodes) {
var startTime = System.nanoTime();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier beginnt das Time measurement der Worker

for (AbstractQNetsimEngineRunner engine : this.getQnetsimEngineRunner()) {
((QNetsimEngineRunnerForThreadpool) engine).setMovingNodes(true);
}

var nodesStartTime = System.nanoTime();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier beginnt das Node measurement für das oberste Diagram.

@jfbischoff jfbischoff closed this Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants