Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #4
0
    def __call__(self):
        sample = HostSample(self._pid)
        self._samples.append(sample)

        if self._cif:
            stats = hostapi.get_stats(self._cif, self._samples.stats())
            hostapi.report_stats(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)