#14 performance test

Nyitott
megnyitva ekkor: 9 éve simon által · 2 hozzászólás
simon hozzászólt 9 éve

To benchmark performance, a number of performance tests should be created. One possibility is the bouncing balls example: one could track how many balls were created before the scheduler starts running behind schedule.

To benchmark performance, a number of performance tests should be created. One possibility is the bouncing balls example: one could track how many balls were created before the scheduler starts running behind schedule.
simon hozzászólt 9 éve
Tulajdonos

A bouncing balls performance test was created. It spawns 10 windows, and each second a ball is automatically spawned in each window. The balls move in unison every 1 second. When the scheduler runs behind with more than .5 seconds, the simulation stops and the number of instances is printed.

A bouncing balls performance test was created. It spawns 10 windows, and each second a ball is automatically spawned in each window. The balls move in unison every 1 second. When the scheduler runs behind with more than .5 seconds, the simulation stops and the number of instances is printed.
simon lezárta ekkor: 9 éve
simon kinyitotta ekkor: 9 éve
simon hozzászólt 9 éve
Tulajdonos

More bouncing balls test:

  • test_performance spawns a window each second, and balls are spawned every 50ms. Balls update their position at 50fps (every 20ms)
  • test_performance_threads does the same, but for the threads platform
  • test_performance_cpu_time takes two parameters: the first is the number of windows to spawn, and the second the number of balls to spawn in each window. The windows and balls are spawned as fast as possible. Balls transition every 20ms, and both update their position as well as narrow-cast a message to their parent. The simulation stops after 5 seconds. The program then prints the CPU time needed to run the simulation divided by the current simulation time. This clearly indicates at what point the simulation core cannot keep up (when the number is larger than 1).
More bouncing balls test: - *test_performance* spawns a window each second, and balls are spawned every 50ms. Balls update their position at 50fps (every 20ms) - *test_performance_threads* does the same, but for the threads platform - *test_performance_cpu_time* takes two parameters: the first is the number of windows to spawn, and the second the number of balls to spawn in each window. The windows and balls are spawned as fast as possible. Balls transition every 20ms, and both update their position as well as narrow-cast a message to their parent. The simulation stops after 5 seconds. The program then prints the CPU time needed to run the simulation divided by the current simulation time. This clearly indicates at what point the simulation core cannot keep up (when the number is larger than 1).
Jelentkezzen be hogy csatlakozhasson a beszélgetéshez.
Nincs mérföldkő
Nincs megbízott
1 Résztvevő
Töltés...
Mégse
Mentés
Még nincs tartalom.