Javadoc
Returns the same QueryPlus object, if it already has
QueryMetrics (
#getQueryMetrics() returns not
null), or returns a new QueryPlus object with
Query from this QueryPlus and QueryMetrics created using the
given
QueryToolChest, via
QueryToolChest#makeMetrics(Query) method.
By convention, callers of
withQueryMetrics() must also call .getQueryMetrics().emit() on the returned
QueryMetrics object, regardless if this object is the same as the object on which .withQueryMetrics() was initially
called (i. e. it already had non-null QueryMetrics), or if it is a new QueryPlus object. See
MetricsEmittingQueryRunner for example.