From af3b62443a0118384dbbdeb5a9fa3dd2a62d25bf Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Nov 2017 21:03:01 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 24 ++++++++++++------------ iguana/exchanges/LP_network.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 256757083..6f12b497a 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -39,19 +39,19 @@ void LP_millistats_update(struct LP_millistats *mp) { if ( IAMLP != 0 ) { - mp = &LP_psockloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); + mp = &LP_psockloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); } - mp = &LP_reserved_msgs_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &utxosQ_loop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &command_rpcloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &queue_loop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &prices_loop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_coinsloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_coinsloopBTC_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_coinsloopKMD_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_pubkeysloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_privkeysloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); - mp = &LP_swapsloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count); + mp = &LP_reserved_msgs_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &utxosQ_loop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &command_rpcloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &queue_loop_stats, printf("%32s millis > threshold %8.2f, ave %8.2f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &prices_loop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_coinsloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_coinsloopBTC_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_coinsloopKMD_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_pubkeysloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_privkeysloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); + mp = &LP_swapsloop_stats, printf("%32s millis > threshold %8.3f, ave %8.3f millis, count.%u | lag %.3f\n",mp->name,mp->threshold,mp->millisum/(mp->count > 0 ? mp->count: 1),mp->count,OS_milliseconds() - mp->lastmilli); } else { diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index c241d0eae..c96975a68 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -269,7 +269,7 @@ void queue_loop(void *arg) { struct LP_queue *ptr,*tmp; int32_t sentbytes,nonz,flag,duplicate,n=0; strcpy(queue_loop_stats.name,"queue_loop"); - queue_loop_stats.threshold = 20.; + queue_loop_stats.threshold = 50.; while ( 1 ) { LP_millistats_update(&queue_loop_stats);