File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
etc/api/angular_devkit/core/src
angular_devkit/core/src/analytics Expand file tree Collapse file tree 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.
4343| :---:| :---| :---|
4444| 1 | ` CPU Count ` | ` number ` |
4545| 2 | ` CPU Speed ` | ` number ` |
46- | 3 | ` RAM (In MB ) ` | ` number ` |
46+ | 3 | ` RAM (In GB ) ` | ` number ` |
4747| 4 | ` Node Version ` | ` number ` |
4848| 5 | ` Flag: --style ` | ` string ` |
4949| 6 | ` --collection ` | ` string ` |
Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ export declare class MultiAnalytics implements Analytics {
614614export declare enum NgCliAnalyticsDimensions {
615615 CpuCount = 1 ,
616616 CpuSpeed = 2 ,
617- RamInMegabytes = 3 ,
617+ RamInGigabytes = 3 ,
618618 NodeVersion = 4 ,
619619 NgAddCollection = 6 ,
620620 NgBuildBuildEventLog = 7 ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { isTTY } from '../utilities/tty';
1919const analyticsDebug = debug ( 'ng:analytics' ) ; // Generate analytics, including settings and users.
2020const analyticsLogDebug = debug ( 'ng:analytics:log' ) ; // Actual logs of events.
2121
22- const BYTES_PER_MEGABYTES = 1024 * 1024 ;
22+ const BYTES_PER_GIGABYTES = 1024 * 1024 * 1024 ;
2323
2424/**
2525 * This is the ultimate safelist for checking if a package name is safe to report to analytics.
@@ -102,8 +102,8 @@ function _getCpuSpeed() {
102102 * @private
103103 */
104104function _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 ) ;
107107}
108108
109109/**
@@ -262,7 +262,7 @@ export class UniversalAnalytics implements analytics.Analytics {
262262 // We set custom metrics for values we care about.
263263 this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuCount ] = _getCpuCount ( ) ;
264264 this . _dimensions [ analytics . NgCliAnalyticsDimensions . CpuSpeed ] = _getCpuSpeed ( ) ;
265- this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInMegabytes ] = _getRamSize ( ) ;
265+ this . _dimensions [ analytics . NgCliAnalyticsDimensions . RamInGigabytes ] = _getRamSize ( ) ;
266266 this . _dimensions [ analytics . NgCliAnalyticsDimensions . NodeVersion ] = _getNumericNodeVersion ( ) ;
267267 }
268268
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export * from './logging';
1111export * from './multi' ;
1212export * from './noop' ;
1313
14-
1514/**
1615 * MAKE SURE TO KEEP THIS IN SYNC WITH THE TABLE AND CONTENT IN `/docs/design/analytics.md`.
1716 * WE LIST THOSE DIMENSIONS (AND MORE).
@@ -23,7 +22,7 @@ export * from './noop';
2322export enum NgCliAnalyticsDimensions {
2423 CpuCount = 1 ,
2524 CpuSpeed = 2 ,
26- RamInMegabytes = 3 ,
25+ RamInGigabytes = 3 ,
2726 NodeVersion = 4 ,
2827 NgAddCollection = 6 ,
2928 NgBuildBuildEventLog = 7 ,
@@ -53,7 +52,7 @@ export enum NgCliAnalyticsMetrics {
5352export const NgCliAnalyticsDimensionsFlagInfo : { [ name : string ] : [ string , string ] } = {
5453 CpuCount : [ 'CPU Count' , 'number' ] ,
5554 CpuSpeed : [ 'CPU Speed' , 'number' ] ,
56- RamInMegabytes : [ 'RAM (In MB )' , 'number' ] ,
55+ RamInGigabytes : [ 'RAM (In GB )' , 'number' ] ,
5756 NodeVersion : [ 'Node Version' , 'number' ] ,
5857 NgAddCollection : [ '--collection' , 'string' ] ,
5958 NgBuildBuildEventLog : [ '--buildEventLog' , 'boolean' ] ,
You can’t perform that action at this time.
0 commit comments