Watchdog allows to obtain info string about the statistics

This commit is contained in:
Klaus Basan
2018-01-17 05:00:09 +01:00
parent 95e28b0f89
commit c42b325d54
3 changed files with 26 additions and 1 deletions

View File

@@ -76,8 +76,13 @@ namespace BlackCore
int triggerCheck();
//! Number of completed checks
//! \threadsafe
int getCheckCount() const { return m_checkCount; }
//! Number of completed checks
//! \threadsafe
QString getCheckInfo() const;
//! Set working URL from external
//! \threadsafe
void setWorkingSharedUrl(const BlackMisc::Network::CUrl &workingUrl);
@@ -150,6 +155,10 @@ namespace BlackCore
std::atomic_bool m_checkSharedUrl { true };
std::atomic_bool m_checkInProgress { false }; //!< a check is currently in progress
std::atomic_int m_checkCount { 0 }; //!< counting number of checks
std::atomic_int m_badCountDb { 0 }; //! Total number of DB failing counts (only real responses when tried)
std::atomic_int m_badCountInternet { 0 }; //! Total number of Internet failing count (only when network is accessible)
std::atomic_int m_goodCountDb { 0 };
std::atomic_int m_goodCountInternet { 0 };
BlackMisc::Network::CUrl m_workingSharedUrl;
mutable QReadWriteLock m_lockSharedUrl;
};