Ubuntu 18.04 Upgrade #3

Merged
RoshanSyed merged 143 commits from github/fork/PBSA/master into master 2019-09-03 16:20:50 +00:00
Showing only changes of commit 0688b7eb64 - Show all commits

View file

@ -98,7 +98,15 @@ std::string websocket_api_connection::on_message(
{ {
try try
{ {
auto start = time_point::now();
auto result = _rpc_state.local_call( call.method, call.params ); auto result = _rpc_state.local_call( call.method, call.params );
auto end = time_point::now();
if( end - start > fc::seconds( 1 ) )
elog( "API call execution time limit exceeded.", ("method",call.method)("params",call.params)("time", end - start) );
else if( end - start > fc::milliseconds( 750 ) )
wlog( "API call execution time nearing limit.", ("method",call.method)("params",call.params)("time", end - start) );
if( call.id ) if( call.id )
{ {
auto reply = fc::json::to_string( response( *call.id, result ) ); auto reply = fc::json::to_string( response( *call.id, result ) );