async _getMetricsMatchingPattern (pattern) {
    const keys = await Utils._getAllKeysMatchingPattern(pattern)

    // Short-circuit here since redis `mget` throws if array param has 0-length
    if (!keys || !keys.length) {
      return {}
    }

    // This works because vals.length === keys.length
    // https://redis.io/commands/mget
    const vals = await redisClient.mget(keys)

    // Zip keys and vals arrays into map of key-val pairs
    const keyMap = {}
    for (let i = 0; i < keys.length; i++) {
      keyMap[keys[i]] = vals[i]
    }

    return keyMap
  }
/**
   * Given redis key pattern, returns all keys matching pattern and associated values
   * Returns map of key-value pairs
   */
Given redis key pattern, returns all keys matching pattern and associated values
Returns map of key-value pairs
Given redis key pattern returns all keys matching pattern and associated values Returns map of key - value pairs
async _getMetricsMatchingPattern (pattern) {
    const keys = await Utils._getAllKeysMatchingPattern(pattern)
    if (!keys || !keys.length) {
      return {}
    }
    const vals = await redisClient.mget(keys)
    const keyMap = {}
    for (let i = 0; i < keys.length; i++) {
      keyMap[keys[i]] = vals[i]
    }
    return keyMap
  }
async _getMetricsMatchingPattern ( pattern ) { const keys = await Utils . _getAllKeysMatchingPattern ( pattern ) if ( ! keys || ! keys . length ) { return { } } const vals = await redisClient . mget ( keys ) const keyMap = { } for ( let i = 0 ; i < keys . length ; i ++ ) { keyMap [ keys [ i ] ] = vals [ i ] } return keyMap }
Given redis key pattern, returns all keys matching pattern and associated values
 Returns map of key-value pairs
Given redis key pattern returns all keys matching pattern and associated values Returns map of key - value pairs
// Short-circuit here since redis `mget` throws if array param has 0-length // This works because vals.length === keys.length // https://redis.io/commands/mget // Zip keys and vals arrays into map of key-val pairs