You do have org.apache.lucene.benchmark.quality.QualityStats.getAvp()
to get average precision.
This returns the Average precision for a single query when running a quality benchmark.
Getting the mean from the set of query should be fairly easy from this point.