YaoHaishi created SCB-1210: ------------------------------ Summary: improve the average latency precision of the metrics log Key: SCB-1210 URL: https://issues.apache.org/jira/browse/SCB-1210 Project: Apache ServiceComb Issue Type: Improvement Reporter: YaoHaishi Assignee: YaoHaishi
For a long statistical period and low tps situation, for example, metrics period is 60 sec and there are only two invocation each costs 1.5 second to process. The metrics log print the max latency correctly(1500ms), but the printed average latency is 0. The cause is that a int variable is used to calculate the tps distributed into every second and the average latency is calculated by (tps distributed into every second)/(total latency distributed into every second). And in such situation, the tps data distributed to every second is 0, so the average latency is 0. The tps data should be stored in a double variable and the metrics log format should be adjust slightly. -- This message was sent by Atlassian JIRA (v7.6.3#76005)