Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@angular/ssr): enable performance profiler option name #26214

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion goldens/public-api/angular/ssr/index.md
Expand Up @@ -17,7 +17,7 @@ export class CommonEngine {
// @public (undocumented)
export interface CommonEngineOptions {
bootstrap?: Type<{}> | (() => Promise<ApplicationRef>);
enablePeformanceProfiler?: boolean;
enablePerformanceProfiler?: boolean;
providers?: StaticProvider[];
}

Expand Down
8 changes: 4 additions & 4 deletions packages/angular/ssr/src/common-engine.ts
Expand Up @@ -26,7 +26,7 @@ export interface CommonEngineOptions {
/** A set of platform level providers for all requests. */
providers?: StaticProvider[];
/** Enable request performance profiling data collection and printing the results in the server console. */
enablePeformanceProfiler?: boolean;
enablePerformanceProfiler?: boolean;
}

export interface CommonEngineRenderOptions {
Expand Down Expand Up @@ -69,9 +69,9 @@ export class CommonEngine {
* render options
*/
async render(opts: CommonEngineRenderOptions): Promise<string> {
const enablePeformanceProfiler = this.options?.enablePeformanceProfiler;
const enablePerformanceProfiler = this.options?.enablePerformanceProfiler;

const runMethod = enablePeformanceProfiler
const runMethod = enablePerformanceProfiler
? runMethodAndMeasurePerf
: noopRunMethodAndMeasurePerf;

Expand All @@ -95,7 +95,7 @@ export class CommonEngine {
}
}

if (enablePeformanceProfiler) {
if (enablePerformanceProfiler) {
printPerformanceLogs();
}

Expand Down