Skip to content

Commit

Permalink
result logging
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed May 13, 2024
1 parent 6ca0e03 commit fc2e9c0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions CountItems/CountManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ class CountManager {
&& results.dataMetrics.location
&& results.dataMetrics.account) {
Object.keys(results.dataMetrics).forEach(metricLevel => {
if (metricLevel === 'account' && !this.uniqueAccounts.has(resourceName)) {
this.uniqueAccounts.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});
}
if (metricLevel === 'location' && !this.uniqueLocations.has(resourceName)) {
this.uniqueLocations.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});
}
if (metricLevel === 'bucket' && !this.uniqueBuckets.has(resourceName)) {
this.uniqueBuckets.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});
}
console.log(monitoring.metricsCount);
// metricLevel can only be 'bucket', 'location' or 'account'
if (validStorageMetricLevels.has(metricLevel)) {
Object.keys(results.dataMetrics[metricLevel]).forEach(resourceName => {
if (metricLevel === 'account' && !this.uniqueAccounts.has(resourceName)) {
this.uniqueAccounts.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});

Check failure on line 101 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Expected property shorthand

Check failure on line 101 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Extra space after key 'metricLevel'

Check failure on line 101 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

A space is required before '}'
}
if (metricLevel === 'location' && !this.uniqueLocations.has(resourceName)) {
this.uniqueLocations.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});

Check failure on line 105 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Expected property shorthand

Check failure on line 105 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Extra space after key 'metricLevel'

Check failure on line 105 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

A space is required before '}'
}
if (metricLevel === 'bucket' && !this.uniqueBuckets.has(resourceName)) {
this.uniqueBuckets.add(resourceName);
monitoring.metricsCount.inc({ metricLevel : metricLevel});

Check failure on line 109 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Expected property shorthand

Check failure on line 109 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Extra space after key 'metricLevel'

Check failure on line 109 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

A space is required before '}'
}
console.log(monitoring.metricsCount);

Check failure on line 111 in CountItems/CountManager.js

View workflow job for this annotation

GitHub Actions / tests

Unexpected console statement
// resourceName can be the name of bucket, location or account
this.dataMetrics[metricLevel][resourceName] = consolidateDataMetrics(
this.dataMetrics[metricLevel][resourceName],
Expand Down

0 comments on commit fc2e9c0

Please sign in to comment.