all pollers converted to single thread pool
[public/netxms.git] / src / server / core / datacoll.cpp
index b086b10..df27d00 100644 (file)
@@ -30,8 +30,6 @@
 /**
  * Externals
  */
-extern Queue g_statusPollQueue;
-extern Queue g_configPollQueue;
 extern Queue g_syslogProcessingQueue;
 extern Queue g_syslogWriteQueue;
 
@@ -43,8 +41,6 @@ double g_dAvgDBWriterQueueSize = 0;
 double g_dAvgIDataWriterQueueSize = 0;
 double g_dAvgRawDataWriterQueueSize = 0;
 double g_dAvgDBAndIDataWriterQueueSize = 0;
-double g_dAvgStatusPollerQueueSize = 0;
-double g_dAvgConfigPollerQueueSize = 0;
 double g_dAvgSyslogProcessingQueueSize = 0;
 double g_dAvgSyslogWriterQueueSize = 0;
 UINT32 g_dwAvgDCIQueuingTime = 0;
@@ -360,17 +356,14 @@ static THREAD_RESULT THREAD_CALL StatCollector(void *pArg)
    UINT32 i, currPos = 0;
    UINT32 pollerQS[12], dbWriterQS[12];
    UINT32 iDataWriterQS[12], rawDataWriterQS[12], dbAndIDataWriterQS[12];
-   UINT32 statusPollerQS[12], configPollerQS[12];
    UINT32 syslogProcessingQS[12], syslogWriterQS[12];
-   double sum1, sum2, sum3, sum4, sum5, sum6, sum7, sum8, sum9;
+   double sum1, sum2, sum3, sum4, sum5, sum8, sum9;
 
    memset(pollerQS, 0, sizeof(UINT32) * 12);
    memset(dbWriterQS, 0, sizeof(UINT32) * 12);
    memset(iDataWriterQS, 0, sizeof(UINT32) * 12);
    memset(rawDataWriterQS, 0, sizeof(UINT32) * 12);
    memset(dbAndIDataWriterQS, 0, sizeof(UINT32) * 12);
-   memset(statusPollerQS, 0, sizeof(UINT32) * 12);
-   memset(configPollerQS, 0, sizeof(UINT32) * 12);
    memset(syslogProcessingQS, 0, sizeof(UINT32) * 12);
    memset(syslogWriterQS, 0, sizeof(UINT32) * 12);
    g_dAvgPollerQueueSize = 0;
@@ -378,8 +371,6 @@ static THREAD_RESULT THREAD_CALL StatCollector(void *pArg)
    g_dAvgIDataWriterQueueSize = 0;
    g_dAvgRawDataWriterQueueSize = 0;
    g_dAvgDBAndIDataWriterQueueSize = 0;
-   g_dAvgStatusPollerQueueSize = 0;
-   g_dAvgConfigPollerQueueSize = 0;
    g_dAvgSyslogProcessingQueueSize = 0;
    g_dAvgSyslogWriterQueueSize = 0;
    while(!IsShutdownInProgress())
@@ -393,8 +384,6 @@ static THREAD_RESULT THREAD_CALL StatCollector(void *pArg)
       iDataWriterQS[currPos] = g_dciDataWriterQueue->size();
       rawDataWriterQS[currPos] = g_dciRawDataWriterQueue->size();
       dbAndIDataWriterQS[currPos] = g_dbWriterQueue->size() + g_dciDataWriterQueue->size() + g_dciRawDataWriterQueue->size();
-      statusPollerQS[currPos] = g_statusPollQueue.size();
-      configPollerQS[currPos] = g_configPollQueue.size();
       syslogProcessingQS[currPos] = g_syslogProcessingQueue.size();
       syslogWriterQS[currPos] = g_syslogWriteQueue.size();
       currPos++;
@@ -402,15 +391,13 @@ static THREAD_RESULT THREAD_CALL StatCollector(void *pArg)
          currPos = 0;
 
       // Calculate new averages
-      for(i = 0, sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0, sum5 = 0, sum6 = 0, sum7 = 0, sum8 = 0, sum9 = 0; i < 12; i++)
+      for(i = 0, sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0, sum5 = 0, sum8 = 0, sum9 = 0; i < 12; i++)
       {
          sum1 += pollerQS[i];
          sum2 += dbWriterQS[i];
          sum3 += iDataWriterQS[i];
          sum4 += rawDataWriterQS[i];
          sum5 += dbAndIDataWriterQS[i];
-         sum6 += statusPollerQS[i];
-         sum7 += configPollerQS[i];
          sum8 += syslogProcessingQS[i];
          sum9 += syslogWriterQS[i];
       }
@@ -419,8 +406,6 @@ static THREAD_RESULT THREAD_CALL StatCollector(void *pArg)
       g_dAvgIDataWriterQueueSize = sum3 / 12;
       g_dAvgRawDataWriterQueueSize = sum4 / 12;
       g_dAvgDBAndIDataWriterQueueSize = sum5 / 12;
-      g_dAvgStatusPollerQueueSize = sum6 / 12;
-      g_dAvgConfigPollerQueueSize = sum7 / 12;
       g_dAvgSyslogProcessingQueueSize = sum8 / 12;
       g_dAvgSyslogWriterQueueSize = sum9 / 12;
    }