Report "Apply" time in logs

This commit is contained in:
Srivats P 2019-06-29 12:37:12 +05:30
parent c43f7d1769
commit 3fca24396d
2 changed files with 7 additions and 1 deletions

View File

@ -514,6 +514,8 @@ void PortGroup::when_configApply(int portIndex)
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
mainWindow->setDisabled(true);
applyTimer_.start();
//
// Update/Sync DeviceGroups
//
@ -796,7 +798,9 @@ void PortGroup::processApplyBuildAck(int portIndex, PbRpcController *controller)
OstProto::Ack *ack = static_cast<OstProto::Ack*>(controller->response());
qDebug("apply completed");
logInfo(id(), mPorts[portIndex]->id(), QString("All port changes applied"));
logInfo(id(), mPorts[portIndex]->id(),
QString("All port changes applied - in %1s")
.arg(applyTimer_.elapsed()/1e3));
if (controller->Failed())
{

View File

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#define _PORT_GROUP_H
#include "port.h"
#include <QElapsedTimer>
#include <QHostAddress>
#include <QTcpSocket>
@ -62,6 +63,7 @@ private:
PbRpcChannel *rpcChannel;
PbRpcController *statsController;
bool isGetStatsPending_;
QElapsedTimer applyTimer_;
OstProto::OstService::Stub *serviceStub;