File tree 4 files changed +8
-9
lines changed
etc/api/angular_devkit/core/src
angular_devkit/core/src/analytics 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ Note: There's a limit of 20 custom dimensions.
43
43
| :---:| :---| :---|
44
44
| 1 | ` CPU Count ` | ` number ` |
45
45
| 2 | ` CPU Speed ` | ` number ` |
46
- | 3 | ` RAM (In MB ) ` | ` number ` |
46
+ | 3 | ` RAM (In GB ) ` | ` number ` |
47
47
| 4 | ` Node Version ` | ` number ` |
48
48
| 5 | ` Flag: --style ` | ` string ` |
49
49
| 6 | ` --collection ` | ` string ` |
Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ export declare class MultiAnalytics implements Analytics {
614
614
export declare enum NgCliAnalyticsDimensions {
615
615
CpuCount = 1 ,
616
616
CpuSpeed = 2 ,
617
- RamInMegabytes = 3 ,
617
+ RamInGigabytes = 3 ,
618
618
NodeVersion = 4 ,
619
619
NgAddCollection = 6 ,
620
620
NgBuildBuildEventLog = 7 ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { isTTY } from '../utilities/tty';
19
19
const analyticsDebug = debug ( 'ng:analytics' ) ; // Generate analytics, including settings and users.
20
20
const analyticsLogDebug = debug ( 'ng:analytics:log' ) ; // Actual logs of events.
21
21
22
- const BYTES_PER_MEGABYTES = 1024 * 1024 ;
22
+ const BYTES_PER_GIGABYTES = 1024 * 1024 * 1024 ;
23
23
24
24
/**
25
25
* This is the ultimate safelist for checking if a package name is safe to report to analytics.
@@ -102,8 +102,8 @@ function _getCpuSpeed() {
102
102
* @private
103
103
*/
104
104
function _getRamSize ( ) {
105
- // Report in megabytes . Otherwise it's too much noise.
106
- return Math . floor ( os . totalmem ( ) / BYTES_PER_MEGABYTES ) ;
105
+ // Report in gigabytes (or closest) . Otherwise it's too much noise.
106
+ return Math . round ( os . totalmem ( ) / BYTES_PER_GIGABYTES ) ;
107
107
}
108
108
109
109
/**
@@ -262,7 +262,7 @@ export class UniversalAnalytics implements analytics.Analytics {
262
262
// We set custom metrics for values we care about.
263
263
this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuCount ] = _getCpuCount ( ) ;
264
264
this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuSpeed ] = _getCpuSpeed ( ) ;
265
- this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInMegabytes ] = _getRamSize ( ) ;
265
+ this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInGigabytes ] = _getRamSize ( ) ;
266
266
this . _dimensions [ analytics . NgCliAnalyticsDimensions . NodeVersion ] = _getNumericNodeVersion ( ) ;
267
267
}
268
268
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export * from './logging';
11
11
export * from './multi' ;
12
12
export * from './noop' ;
13
13
14
-
15
14
/**
16
15
* MAKE SURE TO KEEP THIS IN SYNC WITH THE TABLE AND CONTENT IN `/docs/design/analytics.md`.
17
16
* WE LIST THOSE DIMENSIONS (AND MORE).
@@ -23,7 +22,7 @@ export * from './noop';
23
22
export enum NgCliAnalyticsDimensions {
24
23
CpuCount = 1 ,
25
24
CpuSpeed = 2 ,
26
- RamInMegabytes = 3 ,
25
+ RamInGigabytes = 3 ,
27
26
NodeVersion = 4 ,
28
27
NgAddCollection = 6 ,
29
28
NgBuildBuildEventLog = 7 ,
@@ -53,7 +52,7 @@ export enum NgCliAnalyticsMetrics {
53
52
export const NgCliAnalyticsDimensionsFlagInfo : { [ name : string ] : [ string , string ] } = {
54
53
CpuCount : [ 'CPU Count' , 'number' ] ,
55
54
CpuSpeed : [ 'CPU Speed' , 'number' ] ,
56
- RamInMegabytes : [ 'RAM (In MB )' , 'number' ] ,
55
+ RamInGigabytes : [ 'RAM (In GB )' , 'number' ] ,
57
56
NodeVersion : [ 'Node Version' , 'number' ] ,
58
57
NgAddCollection : [ '--collection' , 'string' ] ,
59
58
NgBuildBuildEventLog : [ '--buildEventLog' , 'boolean' ] ,
You can’t perform that action at this time.
0 commit comments