FPRGaugeManager+Private.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. @interface FPRGaugeManager ()
  19. /** @brief Tracks if gauge collection is enabled. */
  20. @property(nonatomic, readonly) BOOL gaugeCollectionEnabled;
  21. /** @brief CPU gauge collector. */
  22. @property(nonatomic, readwrite, nullable) FPRCPUGaugeCollector *cpuGaugeCollector;
  23. /** @brief Memory gauge collector. */
  24. @property(nonatomic, readwrite, nullable) FPRMemoryGaugeCollector *memoryGaugeCollector;
  25. /** @brief Serial queue to manage gauge data collection. */
  26. @property(nonatomic, readwrite, nonnull) dispatch_queue_t gaugeDataProtectionQueue;
  27. /** @brief Tracks if this session is a cold start of the application. */
  28. @property(nonatomic) BOOL isColdStart;
  29. /**
  30. * Creates an instance of FPRGaugeManager with the gauges required.
  31. */
  32. - (nonnull instancetype)initWithGauges:(FPRGauges)gauges;
  33. /**
  34. * Prepares for dispatching the current set of gauge data to Google Data Transport.
  35. *
  36. * @param sessionId SessionId that will be used for dispatching the gauge data
  37. */
  38. - (void)prepareAndDispatchCollectedGaugeDataWithSessionId:(nullable NSString *)sessionId;
  39. @end