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 @@ -20,7 +20,7 @@ import { isTTY } from '../utilities/tty';
20
20
const analyticsDebug = debug ( 'ng:analytics' ) ; // Generate analytics, including settings and users.
21
21
const analyticsLogDebug = debug ( 'ng:analytics:log' ) ; // Actual logs of events.
22
22
23
- const BYTES_PER_MEGABYTES = 1024 * 1024 ;
23
+ const BYTES_PER_GIGABYTES = 1024 * 1024 * 1024 ;
24
24
25
25
let _defaultAngularCliPropertyCache : string ;
26
26
export const AnalyticsProperties = {
@@ -129,8 +129,8 @@ function _getCpuSpeed() {
129
129
* @private
130
130
*/
131
131
function _getRamSize ( ) {
132
- // Report in megabytes . Otherwise it's too much noise.
133
- return Math . floor ( os . totalmem ( ) / BYTES_PER_MEGABYTES ) ;
132
+ // Report in gigabytes (or closest) . Otherwise it's too much noise.
133
+ return Math . round ( os . totalmem ( ) / BYTES_PER_GIGABYTES ) ;
134
134
}
135
135
136
136
/**
@@ -287,7 +287,7 @@ export class UniversalAnalytics implements analytics.Analytics {
287
287
// We set custom metrics for values we care about.
288
288
this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuCount ] = _getCpuCount ( ) ;
289
289
this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuSpeed ] = _getCpuSpeed ( ) ;
290
- this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInMegabytes ] = _getRamSize ( ) ;
290
+ this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInGigabytes ] = _getRamSize ( ) ;
291
291
this . _dimensions [ analytics . NgCliAnalyticsDimensions . NodeVersion ] = _getNumericNodeVersion ( ) ;
292
292
}
293
293
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