I am new to bullet physics, and I would like to measure the performance of my simple simulation. I have read in the user manual and have seen posts here describing the CProfileManager class and the dumpAll() method. However, while it seems that these should be straightforward to use, I can't get dumpAll() to print anything.
I built the bullet 3.07 libraries using Cmake on a windows 7 with mingw.
I have included btQuickprof.h. At first my compiler said CProfileManager had not been defined, and looking in the btQuickprof.h file, I found that BT_NO_PROFILE was defined by default, preventing these classes from compiling. I commented out BT_NO_PROFILE, and the compiler could find the classes. Now, although all classes and methods are recognized, CProfileManager::dumpAll() gives no output. There are no errors or warnings.
This loop (not my whole program) runs without errors, but prints nothing:
Code: Select all
for(int i = 0; i < 100; i++)
{
dynamicsWorld->stepSimulation(1.f/60.f, 10);
CProfileManager::dumpAll();
}
I am able to use CProfileManager::Reset() and CProfileManager::Get_Time_Since_Reset() to measure dynamicsWorld->stepSimulation(), as below:
Code: Select all
for(int i = 0; i < 100; i++)
{
CProfileManager::Reset();
dynamicsWorld->stepSimulation(1.f/60.f, 10);
printf("stepSimulation time (ms): %f\n", CProfileManager::Get_Time_Since_Reset());
}
If anyone has any thoughts on how to make dumpAll work, they would be greatly appreciated. Alternatively, if there is another method I could use to access specifically collision detection performance, I would happily use that instead.
Thanks!