Closed vita-dounai closed 5 years ago
Yes, you're absolutely right. There's an ongoing debate about the scope of Caliper. Specifically, whether it should collect such data at all. There're many industrial-grade tools available for resource monitoring, with a seamless integration pipeline between different tools (from metric collection to visualization).
So in the long term, it's possible that resource monitoring will be removed from Caliper, and it will only collect the client-side transaction metrics, as defined by the PSWG whitepaper. We'll see. We certainly don't want to reinvent the wheel (nor we have the resources for it).
However, in the meantime, we'd really appreciate if you'd open a PR with the fix since it looks like you got it working :)
Resolved by #508
Context
I set up a 4 blockchain nodes benchmark in which all nodes running in local docker containers. Although my machine has only 8 cores, the CPU percent statistics return by Caliper shows that the CPU usage percentage of each container had been beyond 1500%, it's not reasonable.
Expected Behavior
The CPU usage percentage of each node container should not exceed 800% with a 8 cores CPU.
Actual Behavior
Possible Fix
The way to calculate CPU usage for local docker container should be same as remote docker container.
Steps to Reproduce
Existing issues
Context
This problem make that Caliper can't afford accurate CPU usage statistics for me. When I try to copy code for calculating CPU usage from the code block for remote docker container, the problem is solved.
Your Environment