I believe the best course of action is to make an additional scripted field for each document that is Duration / Number of Attempts, then create your Metric and use the average of that field.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.