-
EvgenyMekhanik authored
Currently getting iproto statistics per thread is possible only in debug mode, using `ERRINJ_IPROTO_SINGLE_THREAD_STAT` (it can be used only in tests). This way have several disadvantages: first of all `errinj` is not a place to get statistics, secondly user may be interested in getting iproto statistics per thread. In this patch `box.stat.net.thread` was implemented, it can be used for getting same statistics as from `box.stat.net` but per thread. Part of #6293 @TarantoolBot document Title: getting network statistic per thread was implemented User has possibility to run several iproto threads, but at the moment he can get only general statistics, which combines statistics for all threads. Now `box.stat.net.thread` has been implemented to get the same statistics as when using `box.stat.net`, but for a thread. User can call `box.stat.net.thread()` as a function to get general network statistics per threads. For example for two iproto threads: --- - - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 ... Also user can indexed it as a table by thread number. For example `box.stat.net.thread[1]` returns network statistics for first iproto thread: --- - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 ...
EvgenyMekhanik authoredCurrently getting iproto statistics per thread is possible only in debug mode, using `ERRINJ_IPROTO_SINGLE_THREAD_STAT` (it can be used only in tests). This way have several disadvantages: first of all `errinj` is not a place to get statistics, secondly user may be interested in getting iproto statistics per thread. In this patch `box.stat.net.thread` was implemented, it can be used for getting same statistics as from `box.stat.net` but per thread. Part of #6293 @TarantoolBot document Title: getting network statistic per thread was implemented User has possibility to run several iproto threads, but at the moment he can get only general statistics, which combines statistics for all threads. Now `box.stat.net.thread` has been implemented to get the same statistics as when using `box.stat.net`, but for a thread. User can call `box.stat.net.thread()` as a function to get general network statistics per threads. For example for two iproto threads: --- - - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 ... Also user can indexed it as a table by thread number. For example `box.stat.net.thread[1]` returns network statistics for first iproto thread: --- - SENT: total: 0 rps: 0 CONNECTIONS: current: 0 rps: 0 total: 0 REQUESTS: current: 0 rps: 0 total: 0 RECEIVED: total: 0 rps: 0 ...
.luacheckrc 2.48 KiB