Skip to content

Commit

Permalink
IS 862 remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Sep 22, 2023
1 parent 70827eb commit 696fc12
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 68 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ jobs:
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Release
export CMAKE_BUILD_TYPE=Debug
cd deps
./clean.sh
rm -f ./libwebsockets-from-git.tar.gz
./build.sh PARALLEL_COUNT=$(nproc)
./build.sh PARALLEL_COUNT=$(nproc) DEBUG=1
cd ..
- name: Configure all
run: |
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Release
export CMAKE_BUILD_TYPE=Debug
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ${{ github.event.inputs.cmake_options }} ..
Expand All @@ -116,7 +116,7 @@ jobs:
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Release
export CMAKE_BUILD_TYPE=Debug
cd build
make skaled -j$(nproc)
#echo "Ensure release mode skaled does not have any debug markers"
Expand Down
18 changes: 0 additions & 18 deletions libethereum/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,6 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone(
// NB! Not commit! Commit will be after 1st transaction!
m_state.clearPartialTransactionReceipts();

boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep totalExecuteTime = 0;

unsigned count_bad = 0;
for ( unsigned i = 0; i < _transactions.size(); ++i ) {
Transaction const& tr = _transactions[i];
Expand Down Expand Up @@ -503,15 +501,8 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone(
continue;
}

boost::chrono::high_resolution_clock::time_point timeStart =
boost::chrono::high_resolution_clock::now();
ExecutionResult res =
execute( _bc.lastBlockHashes(), tr, Permanence::Committed, OnOpFunc() );
boost::chrono::high_resolution_clock::time_point timeFinish =
boost::chrono::high_resolution_clock::now();
totalExecuteTime += boost::chrono::duration_cast< boost::chrono::milliseconds >(
timeFinish - timeStart )
.count();
receipts.push_back( m_receipts.back() );

if ( res.excepted == TransactionException::WouldNotBeInBlock )
Expand All @@ -536,12 +527,6 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone(
clog( VerbosityError, "block" ) << "FAILED transaction after consensus! " << ex.what();
}
}
clog( Verbosity::VerbosityInfo, "execute" ) << "EWT:" << executeTime;
clog( Verbosity::VerbosityInfo, "execute" ) << "COMWT:" << commitTime;
clog( Verbosity::VerbosityInfo, "execute" ) << "TEWT:" << totalExecuteTime;

executeTime = 0;
commitTime = 0;

#ifdef HISTORIC_STATE
m_state.mutableHistoricState().saveRootForBlock( m_currentBlock.number() );
Expand Down Expand Up @@ -853,9 +838,6 @@ ExecutionResult Block::execute(
throw -1; // will catch below

resultReceipt = stateSnapshot.execute( envInfo, *m_sealEngine, _t, _p, _onOp );
commitTime += stateSnapshot.getCommitTime();
executeTime += stateSnapshot.getExecuteTime();

// use fake receipt created above if execution throws!!
} catch ( const TransactionException& ex ) {
// shoul not happen as exception in execute() means that tx should not be in block
Expand Down
3 changes: 0 additions & 3 deletions libethereum/Block.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ class Block {
Logger m_logger{ createLogger( VerbosityDebug, "block" ) };
Logger m_loggerDetailed{ createLogger( VerbosityTrace, "block" ) };

boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep commitTime = 0;
boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep executeTime = 0;

Counter< Block > c;
;

Expand Down
9 changes: 0 additions & 9 deletions libethereum/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,17 +583,8 @@ size_t Client::importTransactionsAsBlock(
// end, detect partially executed block
//
size_t cntSucceeded = 0;
boost::chrono::high_resolution_clock::time_point timeStart =
boost::chrono::high_resolution_clock::now();
cntSucceeded = syncTransactions(
_transactions, _gasPrice, _timestamp, bIsPartial ? &vecMissing : nullptr );
boost::chrono::high_resolution_clock::time_point timeFinish =
boost::chrono::high_resolution_clock::now();
clog( Verbosity::VerbosityInfo, "client" )
<< "SYWT:"
<< boost::chrono::duration_cast< boost::chrono::milliseconds >( timeFinish - timeStart )
.count();

sealUnconditionally( false );
importWorkingBlock();

Expand Down
18 changes: 0 additions & 18 deletions libskale/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ State::State( const State& _s )
m_initial_funds = _s.m_initial_funds;
contractStorageLimit_ = _s.contractStorageLimit_;
totalStorageUsed_ = _s.storageUsedTotal();
commitTime = _s.commitTime;
executeTime = _s.executeTime;
}

State& State::operator=( const State& _s ) {
Expand All @@ -295,8 +293,6 @@ State& State::operator=( const State& _s ) {
m_initial_funds = _s.m_initial_funds;
contractStorageLimit_ = _s.contractStorageLimit_;
totalStorageUsed_ = _s.storageUsedTotal();
commitTime = _s.commitTime;
executeTime = _s.executeTime;
#ifdef HISTORIC_STATE
m_historicState = _s.m_historicState;
#endif
Expand Down Expand Up @@ -1019,14 +1015,7 @@ std::pair< ExecutionResult, TransactionReceipt > State::execute( EnvInfo const&
onOp = e.simpleTrace();
#endif
u256 const startGasUsed = _envInfo.gasUsed();
boost::chrono::high_resolution_clock::time_point executeTimeStart =
boost::chrono::high_resolution_clock::now();
bool const statusCode = executeTransaction( e, _t, onOp );
boost::chrono::high_resolution_clock::time_point executeTimeFinish =
boost::chrono::high_resolution_clock::now();
executeTime = boost::chrono::duration_cast< boost::chrono::milliseconds >(
executeTimeFinish - executeTimeStart )
.count();

std::string strRevertReason;
if ( res.excepted == dev::eth::TransactionException::RevertInstruction ) {
Expand Down Expand Up @@ -1067,15 +1056,8 @@ std::pair< ExecutionResult, TransactionReceipt > State::execute( EnvInfo const&
m_fs_ptr->commit();

removeEmptyAccounts = _envInfo.number() >= _sealEngine.chainParams().EIP158ForkBlock;
boost::chrono::high_resolution_clock::time_point commitTimeStart =
boost::chrono::high_resolution_clock::now();
commit( removeEmptyAccounts ? dev::eth::CommitBehaviour::RemoveEmptyAccounts :
dev::eth::CommitBehaviour::KeepEmptyAccounts );
boost::chrono::high_resolution_clock::time_point commitTimeFinish =
boost::chrono::high_resolution_clock::now();
commitTime = boost::chrono::duration_cast< boost::chrono::milliseconds >(
commitTimeFinish - commitTimeStart )
.count();

break;
}
Expand Down
16 changes: 0 additions & 16 deletions libskale/State.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,6 @@ class State {
contractStorageLimit_ = _contractStorageLimit;
}; // only for tests

auto getExecuteTime() {
auto val = executeTime;
executeTime = 0;
return val;
}

auto getCommitTime() {
auto val = commitTime;
commitTime = 0;
return val;
}


private:
void updateToLatestVersion();

Expand Down Expand Up @@ -509,9 +496,6 @@ class State {
dev::s256 totalStorageUsed_ = 0;
dev::s256 currentStorageUsed_ = 0;

boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep commitTime = 0;
boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep executeTime = 0;

#ifdef HISTORIC_STATE
dev::eth::HistoricState m_historicState;

Expand Down

0 comments on commit 696fc12

Please sign in to comment.