Ref T698, write network statistics as file when logged off from network

* enum to string (VatClientQueryType)
* also trace calls in "chronological order"
* added some more "increaseStatisticsValue" calls
This commit is contained in:
Klaus Basan
2019-07-06 00:20:24 +02:00
committed by Mat Sutcliffe
parent 419b837b65
commit a5a6a111e1
4 changed files with 121 additions and 20 deletions

View File

@@ -80,7 +80,7 @@ namespace BlackCore
public:
//! Destructor
virtual ~INetwork() {}
virtual ~INetwork();
//! Underlying library info.
virtual const QString &getLibraryInfo(bool detailed) const = 0;
@@ -117,7 +117,7 @@ namespace BlackCore
//! @}
//! Clear the statistics
void clearStatistics() { m_callStatistics.clear(); }
void clearStatistics();
//! Text statistics
QString getNetworkStatisticsAsText(bool reset, const QString &separator = "\n");
@@ -599,9 +599,14 @@ namespace BlackCore
//! @}
protected:
//! Save the statistics
bool saveNetworkStatistics(const QString &server);
private:
bool m_statistics = false;
QMap <QString, int> m_callStatistics;
bool m_statistics = false;
QMap <QString, int> m_callStatistics;
QVector <QPair<qint64, QString>> m_callByTime;
};
} // namespace