             @_cpu_seconds_total.labels('chld_user')  .set(parseFloat(infos[13]) / CLK_TCK)
             @_cpu_seconds_total.labels('chld_system').set(parseFloat(infos[14]) / CLK_TCK)
 
+            # END: the timings for this run.
+            endG()
+            endH()
 
 
 # some of the commented code below might be used in the future when periodically collecting data (e.g. sliding max of "concurrent" value)

            catch
                num_clients_gauge.set(0)

        mem_usage = new_gauge('process_memory_usage', 'The process.memoryUsage() results', ['type'])
        @register_collector ->
            procmem = process.memoryUsage()
            for k, v of procmem
                mem_usage.labels(k).set(v)

        # our own CPU metrics monitor, separating user and sys!
        # it's actually a counter, since it is non-decreasing, but we'll use .set(...)
        @_cpu_seconds_total = new_gauge('process_cpu_categorized_seconds_total', 'Total number of CPU seconds used', ['type'])

        # init periodically calling @_collect
        setTimeout((=> setInterval(@_collect, FREQ_s * 1000)), DELAY_s * 1000)

    _collect: =>
        # called by @_update to evaluate the collector functions
        #@dbg('_collect called')
        for c in @_collectors


# Prometheus client setup -- https://github.com/siimon/prom-client
prom_client = require('prom-client')


# additionally, record GC statistics
# https://www.npmjs.com/package/prometheus-gc-stats
require('prometheus-gc-stats')()()

# some constants
FREQ_s     = 5   # update stats every FREQ seconds
DELAY_s    = 10    # with an initial delay of DELAY seconds
#DISC_LEN   = 10   # length of queue for recording discrete values
#MAX_BUFFER = 1000 # max. size of buffered values, which are cleared in the @_update step

# collect some recommended default metrics
prom_client.collectDefaultMetrics(timeout: FREQ_s * 1000)

# CLK_TCK (usually 100, but maybe not ...)
try
