- Notifications
You must be signed in to change notification settings - Fork 12k
/
Copy pathbenchmark.ts
24 lines (22 loc) · 593 Bytes
/
benchmark.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Internal benchmark reporting flag.
// Use with CLI --no-progress flag for best results.
// This should be false for commited code.
const_benchmark=false;
/* eslint-disable no-console */
exportfunctiontime(label: string): void{
if(_benchmark){
console.time(label);
}
}
exportfunctiontimeEnd(label: string): void{
if(_benchmark){
console.timeEnd(label);
}
}