-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd5730b
commit b023871
Showing
3 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import CONFIG from '../../CONFIG'; | ||
import Metrics from './types'; | ||
import {CanCaptureOnyxMetrics, CanCapturePerformanceMetrics} from './types'; | ||
|
||
/** | ||
* Is capturing performance stats enabled. | ||
*/ | ||
const canCapturePerformanceMetrics: Metrics['canCapturePerformanceMetrics'] = () => CONFIG.CAPTURE_METRICS; | ||
const canCapturePerformanceMetrics: CanCapturePerformanceMetrics = () => CONFIG.CAPTURE_METRICS; | ||
|
||
/** | ||
* Is capturing Onyx stats enabled. | ||
*/ | ||
const canCaptureOnyxMetrics: Metrics['canCaptureOnyxMetrics'] = () => CONFIG.ONYX_METRICS; | ||
const canCaptureOnyxMetrics: CanCaptureOnyxMetrics = () => CONFIG.ONYX_METRICS; | ||
|
||
export {canCapturePerformanceMetrics, canCaptureOnyxMetrics}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import CONFIG from '../../CONFIG'; | ||
import Metrics from './types'; | ||
import {CanCaptureOnyxMetrics, CanCapturePerformanceMetrics} from './types'; | ||
|
||
// We don't capture performance metrics on web as there are enough tools available | ||
const canCapturePerformanceMetrics: Metrics['canCapturePerformanceMetrics'] = () => false; | ||
const canCapturePerformanceMetrics: CanCapturePerformanceMetrics = () => false; | ||
|
||
const canCaptureOnyxMetrics: Metrics['canCaptureOnyxMetrics'] = () => CONFIG.ONYX_METRICS; | ||
const canCaptureOnyxMetrics: CanCaptureOnyxMetrics = () => CONFIG.ONYX_METRICS; | ||
|
||
export {canCapturePerformanceMetrics, canCaptureOnyxMetrics}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
type Metrics = { | ||
canCapturePerformanceMetrics: () => boolean; | ||
canCaptureOnyxMetrics: () => boolean; | ||
}; | ||
type CanCapturePerformanceMetrics = () => boolean; | ||
type CanCaptureOnyxMetrics = () => boolean; | ||
|
||
export default Metrics; | ||
export type {CanCapturePerformanceMetrics, CanCaptureOnyxMetrics}; |