Exemplo n.º 1
0
    def __call__(self):
        sample = HostSample(self._pid)
        self._samples.append(sample)

        if self._cif and _METRICS_ENABLED:
            stats = hostapi.get_stats(self._cif, self._samples.stats())
            hostapi.send_metrics(stats)
Exemplo n.º 2
0
    def __call__(self):
        sample = HostSample(self._pid)
        self._samples.append(sample)

        if self._cif and _METRICS_ENABLED:
            stats = hostapi.get_stats(self._cif, self._samples.stats())
            hostapi.send_metrics(stats)
Exemplo n.º 3
0
    def __call__(self):
        sample = HostSample(self._pid)
        self._samples.append(sample)

        if self._cif and _METRICS_ENABLED:
            stats = hostapi.get_stats(self._cif, self._samples.stats())
            hostapi.send_metrics(stats)

        second_last = self._samples.last(nth=2)
        if second_last is None:
            self._CONNLOG.debug('%s', sample.to_connlog())
        else:
            diff = sample.connlog_diff(second_last)
            if diff:
                self._CONNLOG.debug('%s', diff)