function verifyMetrics(agent) {
  for (const [metricName, expectedCount] of Object.entries(expectedUpsertMetrics)) {
    const metric = agent.metrics.getMetric(metricName)
    assert.equal(
      metric.callCount,
      expectedCount,
      `should have counted ${metricName} ${expectedCount} times`
    )
  }
}
Asserts all the expected datastore metrics for a given query

@param {Object} agent mocked NR agent