#14 performance test

Открыто
9 лет назад открыта simon · комментариев: 2
simon прокомментировал 9 лет назад

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 прокомментировал 9 лет назад
Владелец

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 открыл снова 9 лет назад
simon прокомментировал 9 лет назад
Владелец

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).
Войдите, чтобы присоединиться к обсуждению.
Нет этапа
Нет ответственного
1 участников
Загрузка...
Отмена
Сохранить
Пока нет содержимого.