Skip to content

Commit cb69374

Browse files
- Remove queue time instrumentation
1 parent 65acd86 commit cb69374

34 files changed

Lines changed: 50 additions & 940 deletions

lib/msal-browser/apiReview/msal-browser.api.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -286,24 +286,11 @@ export class BrowserConfigurationAuthError extends AuthError {
286286
// @public (undocumented)
287287
export class BrowserPerformanceClient extends PerformanceClient implements IPerformanceClient {
288288
constructor(configuration: Configuration, intFields?: Set<string>, abbreviations?: Map<string, string>);
289-
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
290-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
291-
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
292-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
293-
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
294-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
295-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
296-
addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void;
297289
// (undocumented)
298290
generateId(): string;
299291
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
300292
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
301293
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
302-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
303-
setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void;
304-
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
305-
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
306-
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
307294
// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
308295
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
309296
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag

lib/msal-browser/src/cache/BrowserCacheManager.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,11 +1025,6 @@ export class BrowserCacheManager extends CacheManager {
10251025
performanceClient: IPerformanceClient,
10261026
correlationId: string
10271027
): Promise<void> {
1028-
performanceClient.addQueueMeasurement(
1029-
PerformanceEvents.ClearTokensAndKeysWithClaims,
1030-
correlationId
1031-
);
1032-
10331028
const tokenKeys = this.getTokenKeys();
10341029

10351030
const removedAccessTokens: Array<Promise<void>> = [];

lib/msal-browser/src/controllers/StandardController.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,10 +1253,6 @@ export class StandardController implements IController {
12531253
commonRequest: CommonSilentFlowRequest,
12541254
cacheLookupPolicy: CacheLookupPolicy
12551255
): Promise<AuthenticationResult> {
1256-
this.performanceClient.addQueueMeasurement(
1257-
PerformanceEvents.AcquireTokenFromCache,
1258-
commonRequest.correlationId
1259-
);
12601256
switch (cacheLookupPolicy) {
12611257
case CacheLookupPolicy.Default:
12621258
case CacheLookupPolicy.AccessToken:
@@ -1288,10 +1284,6 @@ export class StandardController implements IController {
12881284
commonRequest: CommonSilentFlowRequest,
12891285
cacheLookupPolicy: CacheLookupPolicy
12901286
): Promise<AuthenticationResult> {
1291-
this.performanceClient.addQueueMeasurement(
1292-
PerformanceEvents.AcquireTokenByRefreshToken,
1293-
commonRequest.correlationId
1294-
);
12951287
switch (cacheLookupPolicy) {
12961288
case CacheLookupPolicy.Default:
12971289
case CacheLookupPolicy.AccessTokenAndRefreshToken:
@@ -1323,11 +1315,6 @@ export class StandardController implements IController {
13231315
protected async acquireTokenBySilentIframe(
13241316
request: CommonSilentFlowRequest
13251317
): Promise<AuthenticationResult> {
1326-
this.performanceClient.addQueueMeasurement(
1327-
PerformanceEvents.AcquireTokenBySilentIframe,
1328-
request.correlationId
1329-
);
1330-
13311318
const silentIframeClient = this.createSilentIframeClient(
13321319
request.correlationId
13331320
);
@@ -2057,11 +2044,6 @@ export class StandardController implements IController {
20572044
): Promise<AuthenticationResult> {
20582045
const trackPageVisibility = () =>
20592046
this.trackPageVisibility(request.correlationId);
2060-
this.performanceClient.addQueueMeasurement(
2061-
PerformanceEvents.AcquireTokenSilentAsync,
2062-
request.correlationId
2063-
);
2064-
20652047
this.eventHandler.emitEvent(
20662048
EventType.ACQUIRE_TOKEN_START,
20672049
InteractionType.Silent,

lib/msal-browser/src/crypto/BrowserCrypto.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ export async function sha256Digest(
8888
performanceClient?: IPerformanceClient,
8989
correlationId?: string
9090
): Promise<ArrayBuffer> {
91-
performanceClient?.addQueueMeasurement(
92-
PerformanceEvents.Sha256Digest,
93-
correlationId
94-
);
9591
const encoder = new TextEncoder();
9692
const data = encoder.encode(dataString);
9793
return window.crypto.subtle.digest(

lib/msal-browser/src/crypto/PkceGenerator.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ export async function generatePkceCodes(
3333
logger: Logger,
3434
correlationId: string
3535
): Promise<PkceCodes> {
36-
performanceClient.addQueueMeasurement(
37-
PerformanceEvents.GeneratePkceCodes,
38-
correlationId
39-
);
4036
const codeVerifier = invoke(
4137
generateCodeVerifier,
4238
PerformanceEvents.GenerateCodeVerifier,
@@ -94,10 +90,6 @@ async function generateCodeChallengeFromVerifier(
9490
logger: Logger,
9591
correlationId: string
9692
): Promise<string> {
97-
performanceClient.addQueueMeasurement(
98-
PerformanceEvents.GenerateCodeChallengeFromVerifier,
99-
correlationId
100-
);
10193
try {
10294
// hashed verifier
10395
const pkceHashedCodeVerifier = await invokeAsync(

lib/msal-browser/src/interaction_client/BaseInteractionClient.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,6 @@ export abstract class BaseInteractionClient {
195195
? params.requestExtraQueryParameters["instance_aware"]
196196
: undefined;
197197

198-
this.performanceClient.addQueueMeasurement(
199-
PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
200-
this.correlationId
201-
);
202198
const authorityOptions: AuthorityOptions = {
203199
protocolMode: this.config.system.protocolMode,
204200
OIDCOptions: this.config.auth.OIDCOptions,

lib/msal-browser/src/interaction_client/PlatformAuthInteractionClient.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
159159
request: PopupRequest | SilentRequest | SsoSilentRequest,
160160
cacheLookupPolicy?: CacheLookupPolicy
161161
): Promise<AuthenticationResult> {
162-
this.performanceClient.addQueueMeasurement(
163-
PerformanceEvents.NativeInteractionClientAcquireToken,
164-
request.correlationId
165-
);
166162
this.logger.trace("NativeInteractionClient - acquireToken called.");
167163

168164
// start the perf measurement

lib/msal-browser/src/interaction_client/SilentCacheClient.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ export class SilentCacheClient extends StandardInteractionClient {
2626
async acquireToken(
2727
silentRequest: CommonSilentFlowRequest
2828
): Promise<AuthenticationResult> {
29-
this.performanceClient.addQueueMeasurement(
30-
PerformanceEvents.SilentCacheClientAcquireToken,
31-
silentRequest.correlationId
32-
);
3329
// Telemetry manager only used to increment cacheHits here
3430
const serverTelemetryManager = this.initializeServerTelemetryManager(
3531
ApiId.acquireTokenSilent_silentFlow

lib/msal-browser/src/interaction_client/SilentIframeClient.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ export class SilentIframeClient extends StandardInteractionClient {
8484
async acquireToken(
8585
request: SsoSilentRequest
8686
): Promise<AuthenticationResult> {
87-
this.performanceClient.addQueueMeasurement(
88-
PerformanceEvents.SilentIframeClientAcquireToken,
89-
request.correlationId
90-
);
9187
// Check that we have some SSO data
9288
if (
9389
!request.loginHint &&
@@ -321,10 +317,6 @@ export class SilentIframeClient extends StandardInteractionClient {
321317
request: CommonAuthorizationUrlRequest
322318
): Promise<AuthenticationResult> {
323319
const correlationId = request.correlationId;
324-
this.performanceClient.addQueueMeasurement(
325-
PerformanceEvents.SilentIframeClientTokenHelper,
326-
correlationId
327-
);
328320
const pkceCodes = await invokeAsync(
329321
generatePkceCodes,
330322
PerformanceEvents.GeneratePkceCodes,

lib/msal-browser/src/interaction_client/SilentRefreshClient.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ export class SilentRefreshClient extends StandardInteractionClient {
3131
async acquireToken(
3232
request: CommonSilentFlowRequest
3333
): Promise<AuthenticationResult> {
34-
this.performanceClient.addQueueMeasurement(
35-
PerformanceEvents.SilentRefreshClientAcquireToken,
36-
request.correlationId
37-
);
38-
3934
const baseRequest = await invokeAsync(
4035
initializeBaseRequest,
4136
PerformanceEvents.InitializeBaseRequest,

0 commit comments

Comments
 (0)