FIRCLSMockMXHangDiagnostic.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import "Crashlytics/UnitTests/Mocks/FIRCLSMockMXHangDiagnostic.h"
  15. #if CLS_METRICKIT_SUPPORTED
  16. @interface FIRCLSMockMXHangDiagnostic ()
  17. @property(readwrite, strong, nonnull) FIRCLSMockMXCallStackTree *callStackTree;
  18. @property(readwrite, strong, nonnull) NSMeasurement<NSUnitDuration *> *hangDuration;
  19. @property(readwrite, strong, nonnull) FIRCLSMockMXMetadata *metaData;
  20. @property(readwrite, strong, nonnull) NSString *applicationVersion;
  21. @end
  22. @implementation FIRCLSMockMXHangDiagnostic
  23. @synthesize callStackTree = _callStackTree;
  24. @synthesize hangDuration = _hangDuration;
  25. @synthesize applicationVersion = _applicationVersion;
  26. @synthesize metaData = _metaData;
  27. - (instancetype)initWithCallStackTree:(FIRCLSMockMXCallStackTree *)callStackTree
  28. hangDuration:(NSMeasurement<NSUnitDuration *> *)hangDuration
  29. metaData:(FIRCLSMockMXMetadata *)metaData
  30. applicationVersion:(NSString *)applicationVersion API_AVAILABLE(ios(14)) {
  31. self = [super init];
  32. _callStackTree = callStackTree;
  33. _hangDuration = hangDuration;
  34. _applicationVersion = applicationVersion;
  35. _metaData = metaData;
  36. return self;
  37. }
  38. @end
  39. #endif