Some maps may have a proxy but no data has been put yet. Think of one created a proxy but not put any data in it.
By calling this method we are returning an empty stats object for those maps. This is helpful to monitor those kind
of maps.
175273
private void addStatsOfNoDataIncludedMaps(Map statsPerMap) {
        ProxyService proxyService = nodeEngine.getProxyService();
        Collection<String> mapNames = proxyService.getDistributedObjectNames(SERVICE_NAME);
        for (String mapName : mapNames) {
            if (!statsPerMap.containsKey(mapName)) {
                statsPerMap.put(mapName, EMPTY_LOCAL_MAP_STATS);
            }
        }
    }
173559
@Benchmark
  public void createCallLatency(OutputStreamWriter results) throws Exception {
    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        proxyTClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfilea-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        proxyClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfileb-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        directClientProxyProtocol.create(new CreateRequest(metaInfo, ROOT + "newfilec-" + i++,
            metaInfo.getOrigCaller().getUserName(), FsPermission.getDefault(), true, true,
            (short) 1, 1024));
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
    results.write("  |  ");

    results.write(new MeanDevAccumulator().addResults(new TimedCallable() {
      private int i = 0;

      @Override
      public void callTimed() throws Exception {
        directClientProtocol.create(ROOT + "newfiled-" + i++, FsPermission.getDefault(),
            metaInfo.getOrigCaller().getUserName(), true, true, (short) 1, 1024);
      }
    }, WARMUP_SAMPLES, MEASURED_SAMPLES).report());
  }
213643
protected void createStats() {
    if (stats == null) {
      stats = new DescriptiveStatistics();
      for (T1 value : fullValues) {
        stats.addValue(value.doubleValue());
      }
    }
  }
32610
public java.util.Map captureStatistics()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "captureStatistics");

        java.util.Map statistics = super.captureStatistics();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "captureStatistics",
                       "return statistics=" + statistics);
        return statistics;
    }
1091265
@Override
	public FileBaseStatistics getStatistics(BaseStatistics cachedStats) throws IOException {
		
		final FileBaseStatistics cachedFileStats = cachedStats instanceof FileBaseStatistics ?
			(FileBaseStatistics) cachedStats : null;
				
		try {
			return getFileStats(cachedFileStats, getFilePaths(), new ArrayList<>(getFilePaths().length));
		} catch (IOException ioex) {
			if (LOG.isWarnEnabled()) {
				LOG.warn("Could not determine statistics for paths '" + Arrays.toString(getFilePaths()) + "' due to an io error: "
						+ ioex.getMessage());
			}
		}
		catch (Throwable t) {
			if (LOG.isErrorEnabled()) {
				LOG.error("Unexpected problem while getting the file statistics for paths '" + Arrays.toString(getFilePaths()) + "': "
						+ t.getMessage(), t);
			}
		}
		
		// no statistics available
		return null;
	}
624035
function proxyStream(err, stats) {
    return through.obj(function(chunk, enc, cb) {
        processStats.call(this, chunk, stats);

        if (_.isError(err)) {
            this.emit('error', wrapError(err));
        }

        cb(null, chunk);
    });
}
378909
public StatisticImpl getStatistic() {
        if (enabled) {
            if (proxy == null) {
                System.out.println("[SpdStatisticExternal] null proxy");
                return null;
            }

            proxy.updateStatisticOnRequest(dataId);

            // onReqStatistic will be updated by the component
            // the reference is kept in this class
            return onReqStatistic;
        } else
            return null;
    }
1368783
def stats_send(template = nil, start_date = nil, end_date = nil, options = {})
      data = options
      if template != nil
        data[:template] = template
      end
      if start_date != nil
        data[:start_date] = start_date
      end
      if end_date != nil
        data[:end_date] = end_date
      end
      data[:stat] = 'send'
      api_get(:stats, data)
    end
1216187
public EtcdStoreStatsResponse getStoreStats() {
    try {
      return new EtcdStoreStatsRequest(this.client, retryHandler).send().get();
    } catch (IOException | EtcdException | EtcdAuthenticationException | TimeoutException e) {
      return null;
    }
  }
536762
function() {
      var t = this,
          map = {},
          router = Monitor.getRouter(),
          hostName = Monitor.getRouter().getHostName(),
          appName = Monitor.Config.Monitor.appName,
          appInstance = process.env.NODE_APP_INSTANCE;

      // Add this process to the map
      map[hostName] = {};
      map[hostName][appName] = {
        instances: [appInstance],
        probeClasses: _.keys(Probe.classes)
      };

      // Process all known connections
      var connections = router.findConnections();
      connections.forEach(function(connection) {
        hostName = connection.get('hostName') || connection.get('remoteHostName');
        appName = connection.get('remoteAppName') || '';
        appInstance = connection.get('remoteAppInstance') || '';

        // Don't add to the map not yet connected
        if (connection.connecting || !connection.connected) {
          return;
        }

        // Add the hostname to the map
        var host = map[hostName];
        if (!host) {
          host = map[hostName] = {};
        }

        // Add the app to the map
        var app = host[appName];
        if (!app) {
          app = host[appName] = {
            instances: [appInstance],
            probeClasses: connection.get('remoteProbeClasses')
          };
        } else {
          app.instances.push(appInstance);
        }
      });
      log.info('buildMap', map);

      // Set the map if it's changed.  This method is called whenever
      // connections come and go - including firewalled connections which
      // aren't visible in the map.  Only update if the map has changed.
      if (!_.isEqual(map, t.get('map'))) {
        log.info('mapChanged');
        t.set({
          map: map,
          updateSequence: t.updateSequence++
        });
      } else {
        log.info('mapNotChanged');
      }
    }
156851
public synchronized Map<String, Integer> getStats() {
    Map<String, Integer> stats = new HashMap<String, Integer>();
    for (int i = 0; i < mBuckets.size(); ++i) {
      final int bucketedSize = mBuckets.keyAt(i);
      final Bucket<V> bucket = mBuckets.valueAt(i);
      final String BUCKET_USED_KEY =
          PoolStatsTracker.BUCKETS_USED_PREFIX + getSizeInBytes(bucketedSize);
      stats.put(BUCKET_USED_KEY, bucket.getInUseCount());
    }

    stats.put(PoolStatsTracker.SOFT_CAP, mPoolParams.maxSizeSoftCap);
    stats.put(PoolStatsTracker.HARD_CAP, mPoolParams.maxSizeHardCap);
    stats.put(PoolStatsTracker.USED_COUNT, mUsed.mCount);
    stats.put(PoolStatsTracker.USED_BYTES, mUsed.mNumBytes);
    stats.put(PoolStatsTracker.FREE_COUNT, mFree.mCount);
    stats.put(PoolStatsTracker.FREE_BYTES, mFree.mNumBytes);

    return stats;
  }
1142335
public com.google.api.ads.admanager.axis.v201805.Stats getStats() {
        return stats;
    }
37488
protected RequestStat createRequestStat() {
        BasicRequestStat basicRequestStat = new BasicRequestStat(origin.getName());
        RequestStat.putInSessionContext(basicRequestStat, context);
        return basicRequestStat;
    }
1010643
function getStats() {
  var o = {};
  o.total_connections_received = this.stats.connections;
  o.total_commands_processed = this.stats.commands;
  o.total_net_input_bytes = this.stats.ibytes;
  o.total_net_output_bytes = this.stats.obytes;

  o.rejected_connections = this.stats.rejected;

  o.expired_keys = this.stats.expired;
  o.keyspace_hits = this.stats.hits;
  o.keyspace_misses = this.stats.misses;

  o.pubsub_channels = this.stats.pubsub_channels;
  o.pubsub_patterns = this.stats.pubsub_patterns;

  return o;
}
942864
public static vpn_stats get(nitro_service service) throws Exception{
		vpn_stats obj = new vpn_stats();
		vpn_stats[] response = (vpn_stats[])obj.stat_resources(service);
		return response[0];
	}
321582
def stats(self):
        
        response = self.requester.get(
            '/{endpoint}/{id}/stats',
            endpoint=self.endpoint, id=self.id
        )
        return response.json()
36010
protected java.util.Map captureStatistics()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "captureStatistics"
                            );

        java.util.Map statistics = super.captureStatistics();

        statistics.put("totalBytesWritten", Long.toString(totalBytesWritten));
        statistics.put("totalNumberOfFlushRequests", Long.toString(totalNumberOfFlushRequests));
        statistics.put("totalNumberOfLogBufferWrites", Long.toString(totalNumberOfLogBufferWrites));
        statistics.put("totalNumberOfThreadsFindingFullLogBuffers", Long.toString(totalNumberOfThreadsFindingFullLogBuffers));
        statistics.put("totalNumberOfFlusHelperWaits", Long.toString(totalNumberOfFlushHelperWaits));
        statistics.put("totalNumberOfLogCycles", Long.toString(totalNumberOfLogCycles));

        statistics.put("writeStalledMilliseconds", Long.toString(writeStalledMilliseconds));
        statistics.put("writeCopyingMilliseconds", Long.toString(writeCopyingMilliseconds));

        statistics.put("flushingMilliseconds", Long.toString(flushingMilliseconds));
        statistics.put("otherMilliseconds", Long.toString(otherMilliseconds));
        statistics.put("flushHelperWaitingMilliseconds", Long.toString(flushHelperWaitingMilliseconds));
        statistics.put("paddingStalledMilliseconds", Long.toString(paddingStalledMilliseconds));
        statistics.put("writeUpdateStatedMilliseconds", Long.toString(writeUpdateStateMilliseconds));

        statistics.put("logFullCheckpointsTriggered", Long.toString(logFullCheckpointsTriggered));
        statistics.put("uncheckedBytes", Long.toString(uncheckedBytes));
        statistics.put("uncheckedBytesUpToTruncatePoint", Long.toString(uncheckedBytesUpToMarkPoint));
        statistics.put("getLogFileSpaceLeft()", Long.toString(getLogFileSpaceLeft()));
        statistics.put("fileLogHeader.fileSize", Long.toString(fileLogHeader.fileSize));
        statistics.put("bufferFilePosition+nextFreeByteInLogBuffer", Long.toString(bufferFilePosition + nextFreeByteInLogBuffer));
        statistics.put("stalledForMultiPartID", Long.toString(stalledForMultiPartID));
        statistics.put("totalPaddingBytesWritten", Long.toString(totalPaddingBytesWritten));
        statistics.put("totalPaddingRecords", Long.toString(totalPaddingRecords));

        String histogram = "(0-15 >15) ";
        for (int n = 0; n < numberOfFlushWaitersFrequency.length; n++) {
            histogram += numberOfFlushWaitersFrequency[n] + " ";
            numberOfFlushWaitersFrequency[n] = 0;
        }
        statistics.put("numberOfFlushWaitersFrequency", histogram);

        histogram = "(0-15 >15) ";
        for (int n = 0; n < numberOfPagesWrittenFrequency.length; n++) {
            histogram += numberOfPagesWrittenFrequency[n] + " ";
            numberOfPagesWrittenFrequency[n] = 0;
        }
        statistics.put("numberOfPagesWritttenFrequency", histogram);

        totalBytesWritten = 0; // Number of bytes written so far.
        totalNumberOfFlushRequests = 0; // Number of times flush() was invoked.
        totalNumberOfLogBufferWrites = 0; // Number of times the logBuffer is has written.
        totalNumberOfThreadsFindingFullLogBuffers = 0;
        totalNumberOfFlushHelperWaits = 0; // Number of times the FlushHelper had nothing to do.
        totalNumberOfLogCycles = 0; // Number of times we have cycled through the log.

        writeStalledMilliseconds = 0;
        writeCopyingMilliseconds = 0;
        flushingMilliseconds = 0;
        otherMilliseconds = 0;
        flushHelperWaitingMilliseconds = 0;
        paddingStalledMilliseconds = 0;
        writeUpdateStateMilliseconds = 0;
        stalledForMultiPartID = 0;
        totalPaddingBytesWritten = 0;
        totalPaddingRecords = 0;

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "captureStatistics"
                       , new Object[] { statistics }
                            );
        return statistics;
    }