FPRGaugeManager+Private.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2020 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 "FirebasePerformance/Sources/Gauges/FPRGaugeManager.h"
  15. #import "FirebasePerformance/Sources/Gauges/CPU/FPRCPUGaugeCollector.h"
  16. #import "FirebasePerformance/Sources/Gauges/Memory/FPRMemoryGaugeCollector.h"
  17. /** This extension should only be used for testing. */
  18. NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
  19. @interface FPRGaugeManager ()
  20. /** @brief Tracks if gauge collection is enabled. */
  21. @property(nonatomic, readonly) BOOL gaugeCollectionEnabled;
  22. /** @brief CPU gauge collector. */
  23. @property(nonatomic, readwrite, nullable) FPRCPUGaugeCollector *cpuGaugeCollector;
  24. /** @brief Memory gauge collector. */
  25. @property(nonatomic, readwrite, nullable) FPRMemoryGaugeCollector *memoryGaugeCollector;
  26. /** @brief Serial queue to manage gauge data collection. */
  27. @property(nonatomic, readwrite, nonnull) dispatch_queue_t gaugeDataProtectionQueue;
  28. /** @brief Tracks if this session is a cold start of the application. */
  29. @property(nonatomic) BOOL isColdStart;
  30. /**
  31. * Creates an instance of FPRGaugeManager with the gauges required.
  32. */
  33. - (nonnull instancetype)initWithGauges:(FPRGauges)gauges;
  34. /**
  35. * Prepares for dispatching the current set of gauge data to Google Data Transport.
  36. *
  37. * @param sessionId SessionId that will be used for dispatching the gauge data
  38. */
  39. - (void)prepareAndDispatchCollectedGaugeDataWithSessionId:(nullable NSString *)sessionId;
  40. @end