Skip to content

Commit

Permalink
chore: Add use strict
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbachmann committed Sep 12, 2021
1 parent 191958f commit 0d322fc
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions metrics/heapSizeAndUsed.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const safeMemoryUsage = require('./helpers/safeMemoryUsage')
const NODEJS_HEAP_SIZE_TOTAL = 'nodejs_heap_size_total_bytes'
const NODEJS_HEAP_SIZE_USED = 'nodejs_heap_size_used_bytes'
Expand Down
1 change: 1 addition & 0 deletions metrics/heapSpacesSizeAndUsed.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const v8 = require('v8')
const METRICS = ['total', 'used', 'available']
const NODEJS_HEAP_SIZE = {}
Expand Down
1 change: 1 addition & 0 deletions metrics/helpers/processMetricsHelpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
function createAggregatorByObjectName () {
const all = new Map()
return function aggregateByObjectName (metric, labels, list) {
Expand Down
1 change: 1 addition & 0 deletions metrics/helpers/safeMemoryUsage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
// process.memoryUsage() can throw on some platforms, see https://github.com/siimon/prom-client/issues/67
module.exports = function safeMemoryUsage () {
try { return process.memoryUsage() } catch {}
Expand Down
1 change: 1 addition & 0 deletions metrics/osMemoryHeap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const linuxVariant = require('./osMemoryHeapLinux')
const safeMemoryUsage = require('./helpers/safeMemoryUsage')
const PROCESS_RESIDENT_MEMORY = 'process_resident_memory_bytes'
Expand Down
1 change: 1 addition & 0 deletions metrics/processCpuTotal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const PROCESS_CPU_USER_SECONDS = 'process_cpu_user_seconds_total'
const PROCESS_CPU_SYSTEM_SECONDS = 'process_cpu_system_seconds_total'
const PROCESS_CPU_SECONDS = 'process_cpu_seconds_total'
Expand Down
1 change: 1 addition & 0 deletions metrics/processHandles.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const {createAggregatorByObjectName} = require('./helpers/processMetricsHelpers')

const NODEJS_ACTIVE_HANDLES = 'nodejs_active_handles'
Expand Down
1 change: 1 addition & 0 deletions metrics/processMaxFileDescriptors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const fs = require('fs')
const PROCESS_MAX_FDS = 'process_max_fds'
let maxFds
Expand Down
1 change: 1 addition & 0 deletions metrics/processOpenFileDescriptors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const fs = require('fs')
const process = require('process')
const PROCESS_OPEN_FDS = 'process_open_fds'
Expand Down
1 change: 1 addition & 0 deletions metrics/processRequests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const {createAggregatorByObjectName} = require('./helpers/processMetricsHelpers')

const NODEJS_ACTIVE_REQUESTS = 'nodejs_active_requests'
Expand Down
1 change: 1 addition & 0 deletions metrics/processStartTime.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const startInSeconds = Math.round((Date.now() / 1000) - process.uptime())
const PROCESS_START_TIME = 'process_start_time_seconds'

Expand Down
1 change: 1 addition & 0 deletions metrics/version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
const NODE_VERSION_INFO = 'nodejs_version_info'

module.exports = (meter, {prefix, labels}) => {
Expand Down

0 comments on commit 0d322fc

Please sign in to comment.