From 8cb0fa27dcf220d44e90a3e40da7fc4a6efb754d Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Mon, 11 Mar 2024 16:59:17 +0000 Subject: [PATCH] #1774 remove debug logs --- libethereum/SkaleHost.cpp | 24 ------------------------ libskale/broadcaster.cpp | 23 ----------------------- 2 files changed, 47 deletions(-) diff --git a/libethereum/SkaleHost.cpp b/libethereum/SkaleHost.cpp index 06ad30daf..1769d4d72 100644 --- a/libethereum/SkaleHost.cpp +++ b/libethereum/SkaleHost.cpp @@ -866,37 +866,13 @@ void SkaleHost::broadcastFunc() { size_t nBroadcastTaskNumber = 0; while ( !m_exitNeeded ) { try { - static uint64_t txnsCounterSnd = 0; - static boost::chrono::milliseconds totalExecutionTimeSnd = - boost::chrono::milliseconds( 0 ); m_broadcaster->broadcast( "" ); // HACK this is just to initialize sockets - boost::chrono::high_resolution_clock::time_point txnProccessingTimeStart = - boost::chrono::high_resolution_clock::now(); - dev::eth::Transactions txns = m_tq.topTransactionsSync( 1, 0, 1 ); - boost::chrono::high_resolution_clock::time_point txnProccessingTimeFinish = - boost::chrono::high_resolution_clock::now(); if ( txns.empty() ) // means timeout continue; - totalExecutionTimeSnd += boost::chrono::duration_cast< boost::chrono::milliseconds >( - txnProccessingTimeFinish - txnProccessingTimeStart ); - ++txnsCounterSnd; - auto t = boost::chrono::duration_cast< boost::chrono::milliseconds >( - txnProccessingTimeFinish - txnProccessingTimeStart ) - .count(); - if ( t > 1000 ) { - clog( dev::VerbosityWarning, "skale-host" ) - << "Took " << t << " ms to get txn from TQ before broadcast"; - } - if ( txnsCounterSnd % 1000 == 0 ) { - auto avrgTST = totalExecutionTimeSnd / txnsCounterSnd; - clog( dev::VerbosityWarning, "skale-host" ) - << "Average time to prepare txn for broadcast is " << avrgTST << " ms"; - } - this->logState(); MICROPROFILE_SCOPEI( "SkaleHost", "broadcastFunc", MP_BISQUE ); diff --git a/libskale/broadcaster.cpp b/libskale/broadcaster.cpp index ca04eb930..037b0b8a4 100644 --- a/libskale/broadcaster.cpp +++ b/libskale/broadcaster.cpp @@ -176,11 +176,6 @@ void ZmqBroadcaster::startService() { zmq_msg_t msg; try { - static uint64_t txnsCounterRcv = 0; - static boost::chrono::milliseconds totalExecutionTimeRcv = - boost::chrono::milliseconds( 0 ); - boost::chrono::high_resolution_clock::time_point txnProccessingTimeStart = - boost::chrono::high_resolution_clock::now(); int res = zmq_msg_init( &msg ); assert( res == 0 ); res = zmq_msg_recv( &msg, client_socket(), 0 ); @@ -211,24 +206,6 @@ void ZmqBroadcaster::startService() { try { m_skaleHost.receiveTransaction( str ); - boost::chrono::high_resolution_clock::time_point txnProccessingTimeFinish = - boost::chrono::high_resolution_clock::now(); - totalExecutionTimeRcv += - boost::chrono::duration_cast< boost::chrono::milliseconds >( - txnProccessingTimeFinish - txnProccessingTimeStart ); - ++txnsCounterRcv; - auto t = boost::chrono::duration_cast< boost::chrono::milliseconds >( - txnProccessingTimeFinish - txnProccessingTimeStart ) - .count(); - if ( t > 1000 ) { - clog( dev::VerbosityWarning, "skale-host" ) - << "Took " << t << " ms to receive txn via broadcast"; - } - if ( txnsCounterRcv % 1000 == 0 ) { - auto avrgTRT = totalExecutionTimeRcv / txnsCounterRcv; - clog( dev::VerbosityWarning, "skale-host" ) - << "Average txn receiving time via broadcast is " << avrgTRT << " ms"; - } } catch ( const std::exception& ex ) { clog( dev::VerbosityDebug, "skale-host" ) << "Received bad transaction through broadcast: " << ex.what();