Skip to content

Commit

Permalink
Hide unnecessarily exposed private methods in GlobalPerformanceLogger (
Browse files Browse the repository at this point in the history
…#37947)

Summary:
Pull Request resolved: #37947

# Changelog:
[Internal] -

This is a follow-up to an earlier change, that inadvertently added internal methods as public into the GlobalPerformance API.

Reviewed By: rubennorte

Differential Revision: D46820273

fbshipit-source-id: b960b436e3e5e8f81a76bd3ced7282f76906dfca
  • Loading branch information
rshest authored and facebook-github-bot committed Jun 17, 2023
1 parent 53526e7 commit af57ce1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ class PerformanceLogger implements IPerformanceLogger {
//
// In most of the other cases this kind of check for `performance` being defined
// wouldn't be necessary.
performanceMark(key: string, startTime: number) {
_performanceMark(key: string, startTime: number) {
if (this._isLoggingForWebPerformance) {
global.performance?.mark?.(key, {
startTime,
});
}
}

performanceMeasure(
_performanceMeasure(
key: string,
start: number | string,
end: number | string,
Expand Down Expand Up @@ -100,7 +100,7 @@ class PerformanceLogger implements IPerformanceLogger {
endExtras,
};

this.performanceMeasure(
this._performanceMeasure(
`${WEB_PERFORMANCE_PREFIX}_${key}`,
startTime,
endTime,
Expand Down Expand Up @@ -220,7 +220,7 @@ class PerformanceLogger implements IPerformanceLogger {
this._pointExtras[key] = extras;
}

this.performanceMark(`${WEB_PERFORMANCE_PREFIX}_${key}`, timestamp);
this._performanceMark(`${WEB_PERFORMANCE_PREFIX}_${key}`, timestamp);
}

removeExtra(key: string): ?ExtraValue {
Expand Down Expand Up @@ -283,7 +283,7 @@ class PerformanceLogger implements IPerformanceLogger {
infoLog('PerformanceLogger.js', 'start: ' + key);
}

this.performanceMark(
this._performanceMark(
`${WEB_PERFORMANCE_PREFIX}_timespan_start_${key}`,
timestamp,
);
Expand Down Expand Up @@ -333,7 +333,7 @@ class PerformanceLogger implements IPerformanceLogger {
delete _cookies[key];
}

this.performanceMeasure(
this._performanceMeasure(
`${WEB_PERFORMANCE_PREFIX}_${key}`,
`${WEB_PERFORMANCE_PREFIX}_timespan_start_${key}`,
timestamp,
Expand Down

0 comments on commit af57ce1

Please sign in to comment.