/* The function locates PerformanceEx protocol and Performance Protocol from protocol database. */
EFI_STATUS GetPerformanceMeasurementProtocol(VOID)
/* The function locates PerformanceEx protocol and Performance Protocol from protocol database. */
EFI_STATUS GetPerformanceMeasurementProtocol(VOID)
{
  EFI_STATUS                              Status;
  EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL  *PerformanceMeasurement;
  if (mPerformanceMeasurement != NULL) {
    return EFI_SUCCESS;
  }
  Status = gBS->LocateProtocol (&gEdkiiPerformanceMeasurementProtocolGuid, NULL, (VOID **)&PerformanceMeasurement);
  if (!EFI_ERROR (Status)) {
    ASSERT (PerformanceMeasurement != NULL);
    mPerformanceMeasurement = PerformanceMeasurement;
    return EFI_SUCCESS;
  }
  return EFI_NOT_FOUND;
}