log-monitor log file-based interface QPS & time-consuming information statistics tool v1.1 version released

v1.1 update content

  • Removed external dependencies such as json-cpp, making it more lightweight
  • Fix inaccurate QPS statistics

how to use?

tail -f <file>|grep --line-buffered <pattern>|./output/bin/lm

Output format:

log_time: 2019-10-28 10:36:18, QPS:10, avg_cost_time:22, max_cost_time:222
log_time: 2019-10-28 10:36:20, QPS:1, avg_cost_time:222, max_cost_time:222
log_time: 2019-10-28 10:36:21, QPS:2, avg_cost_time:111, max_cost_time:222
log_time: 2019-10-28 10:36:22, QPS:2, avg_cost_time:166, max_cost_time:333
log_time: 2019-10-28 10:36:24, QPS:2, avg_cost_time:166, max_cost_time:333
log_time: 2019-10-28 10:36:25, QPS:1, avg_cost_time:111, max_cost_time:111
log_time: 2019-10-28 10:36:32, QPS:1, avg_cost_time:111, max_cost_time:111

Features

  • Support QPS statistics
  • Support time-consuming statistics (if it is a number after filtering)

Compile

Guess you like

Origin www.oschina.net/news/127218/log-monitor-1-1-released