Refactored implementation of get-trace-executions so it is easier to see the results of the metric