in esrally/metrics.py [0:0]
def get_error_rate(self, task, operation_type=None, sample_type=None):
error = 0
total_count = 0
for doc in self.docs:
# we can use any request metrics record (i.e. service time or latency)
if (
doc["name"] == "service_time"
and doc["task"] == task
and (operation_type is None or doc["operation-type"] == operation_type)
and (sample_type is None or doc["sample-type"] == sample_type.name.lower())
):
total_count += 1
if doc["meta"]["success"] is False:
error += 1
if total_count > 0:
return error / total_count
else:
return 0.0