function calculateApdexZone(duration, apdexT) {
  if (duration <= apdexT) {
    return 'S' // satisfied
  }

  if (duration <= apdexT * 4) {
    return 'T' // tolerating
  }

  return 'F' // frustrated
}
Helper method for determining a transaction's apdex score based on an apdex threshold and transaction duration

@param {number} duration number of seconds the transaction took
@param {number} apdexT the apdex threshold
@returns {string} String representation of apdex "zone"