What does the Efficiency field in the Karate output table represent? Efficiency compared to what?

痴心易碎 提交于 2020-08-09 18:06:10

问题


I was wondering as to what the Efficiency field in the Karate output table in the console represent. I see it has a value of 0.98 after i execute my tests, so it is 98% efficient. But compared to what?

Seems no one had this question earlier i suppose.


回答1:


Simple search through the source (https://github.com/intuit/karate/blob/9992eaf8d7b9dd637477a0970de1a1187b820fc2/karate-core/src/main/java/com/intuit/karate/Results.java#L163)

tells us that:

public double getEfficiency() {
    return timeTakenMillis / (getElapsedTime() * threadCount);
}

If I understood the metric correctly, it means how efficiently we are using threads. If efficiency == 1 then all threads are fully used.

The metric doesn't give any meaningful information unless you have more than 1 thread.

EDIT: more information on the stats: https://stackoverflow.com/a/62958327/143475



来源:https://stackoverflow.com/questions/58048223/what-does-the-efficiency-field-in-the-karate-output-table-represent-efficiency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!