mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T275, count simconnectProc calls and how often it was doing nothing
This commit is contained in:
@@ -258,8 +258,9 @@ namespace BlackSimPlugin
|
||||
|
||||
QString CSimulatorFsxCommon::getStatisticsSimulatorSpecific() const
|
||||
{
|
||||
static const QString specificInfo("dispatch (cur/max): %1ms (%2ms) %3ms (%4ms) %5 %6 simData#: %7");
|
||||
static const QString specificInfo("dispatch #: %1 %2 times (cur/max): %3ms (%4ms) %5ms (%6ms) %7 %8 simData#: %9");
|
||||
return specificInfo.
|
||||
arg(DispatchProc).arg(m_dispatchProcEmpty).
|
||||
arg(m_dispatchTimeMs).arg(m_dispatchProcTimeMs).arg(m_dispatchMaxTimeMs).arg(m_dispatchProcMaxTimeMs).
|
||||
arg(CSimConnectUtilities::simConnectReceiveIdToString(m_dispatchMaxTimeReceiveId),
|
||||
CSimConnectDefinitions::requestToString(m_dispatchMaxTimeRequest)).
|
||||
@@ -316,6 +317,8 @@ namespace BlackSimPlugin
|
||||
|
||||
void CSimulatorFsxCommon::resetAircraftStatistics()
|
||||
{
|
||||
m_dispatchProcCount = 0;
|
||||
m_dispatchProcEmpty = 0;
|
||||
m_dispatchMaxTimeMs = -1;
|
||||
m_dispatchProcMaxTimeMs = -1;
|
||||
m_dispatchTimeMs = -1;
|
||||
|
||||
@@ -430,7 +430,9 @@ namespace BlackSimPlugin
|
||||
int m_skipCockpitUpdateCycles = 0; //!< skip some update cycles to allow changes in simulator cockpit to be set
|
||||
|
||||
// tracing dispatch performance
|
||||
int m_dispatchErrors = 0; //!< number of dispatched failed, \sa dispatch
|
||||
int m_dispatchErrors = 0; //!< number of dispatched failed, \sa dispatch
|
||||
int m_dispatchProcCount = 0; //!< number of dispatchProc counts
|
||||
int m_dispatchProcEmpty = 0; //!< number dispatchProc doing nothing
|
||||
qint64 m_dispatchTimeMs = -1;
|
||||
qint64 m_dispatchMaxTimeMs = -1;
|
||||
qint64 m_dispatchProcTimeMs = -1;
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace BlackSimPlugin
|
||||
CSimulatorFsxCommon *simulatorFsxP3D = static_cast<CSimulatorFsxCommon *>(pContext);
|
||||
const SIMCONNECT_RECV_ID recvId = static_cast<SIMCONNECT_RECV_ID>(pData->dwID);
|
||||
simulatorFsxP3D->m_dispatchLastReceiveId = recvId;
|
||||
simulatorFsxP3D->m_dispatchProcCount++;
|
||||
switch (recvId)
|
||||
{
|
||||
case SIMCONNECT_RECV_ID_OPEN:
|
||||
@@ -355,6 +356,7 @@ namespace BlackSimPlugin
|
||||
break; // SIMCONNECT_RECV_ID_EVENT_FILENAME
|
||||
}
|
||||
default:
|
||||
simulatorFsxP3D->m_dispatchProcEmpty++;
|
||||
break;
|
||||
} // main switch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user