Update the stats.
963288
def update(self):
        """"""
        # Reset stats
        self.reset()

        # Return psutil version as a tuple
        if self.input_method == 'local':
            # psutil version only available in local
            try:
                self.stats = psutil_version_info
            except NameError:
                pass
        else:
            pass

        return self.stats
1224840
def count(self, stats, value, sample_rate=1):
        
        self.update_stats(stats, value, self.SC_COUNT, sample_rate)
150163
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        # !!! JUST FOR TEST (because i did not have any NVidia GPU... :()
        # self.stats = [{"key": "gpu_id", "mem": None, "proc": 60, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}]
        # self.stats = [{"key": "gpu_id", "mem": 10, "proc": 60, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}]
        # self.stats = [{"key": "gpu_id", "mem": 48.64645, "proc": 60.73, "gpu_id": 0, "name": "GeForce GTX 560 Ti"},
        #               {"key": "gpu_id", "mem": 70.743, "proc": 80.28, "gpu_id": 1, "name": "GeForce GTX 560 Ti"},
        #               {"key": "gpu_id", "mem": 0, "proc": 0, "gpu_id": 2, "name": "GeForce GTX 560 Ti"}]
        # self.stats = [{"key": "gpu_id", "mem": 48.64645, "proc": 60.73, "gpu_id": 0, "name": "GeForce GTX 560 Ti"},
        #               {"key": "gpu_id", "mem": None, "proc": 80.28, "gpu_id": 1, "name": "GeForce GTX 560 Ti"},
        #               {"key": "gpu_id", "mem": 0, "proc": 0, "gpu_id": 2, "name": "ANOTHER GPU"}]
        # !!! TO BE COMMENTED

        if not self.nvml_ready:
            return self.stats

        if self.input_method == 'local':
            stats = self.get_device_stats()
        elif self.input_method == 'snmp':
            # not available
            pass

        # Update the stats
        self.stats = stats

        return self.stats
466002
def update(self, stats):
        """"""

        if self.generate_every != 0 and self._timer.finished():
            self.args.generate_graph = True
            self._timer.reset()

        if not self.args.generate_graph:
            return

        plugins = stats.getPluginsList()
        for plugin_name in plugins:
            plugin = stats._plugins[plugin_name]
            if plugin_name in self.plugins_to_export():
                self.export(plugin_name, plugin.get_export_history())

        logger.info("Graphs created in the folder {}".format(self.path))
        self.args.generate_graph = False
600598
private void updateStats() {
        EhcacheStats stats = getProducerStats();
        Statistics statistics = underlyingCache.getStatistics();
        double accesses = statistics.getCacheHits() + statistics.getCacheMisses();
        double hitRatio = accesses != 0 ? statistics.getCacheHits() / accesses : 0;

        stats.getStatisticsAccuracy().setValueAsString(statistics.getStatisticsAccuracyDescription());
        stats.getHitRatio().setValueAsDouble(hitRatio);
        stats.getHits().setValueAsLong(statistics.getCacheHits());
        stats.getMisses().setValueAsLong(statistics.getCacheMisses());
        stats.getElements().setValueAsLong(statistics.getObjectCount());

        stats.getInMemoryHits().setValueAsLong(statistics.getInMemoryHits());
        stats.getInMemoryMisses().setValueAsLong(statistics.getInMemoryMisses());
        stats.getInMemoryElements().setValueAsLong(statistics.getMemoryStoreObjectCount());

        stats.getOnDiskHits().setValueAsLong(statistics.getOnDiskHits());
        stats.getOnDiskMisses().setValueAsLong(statistics.getOnDiskMisses());
        stats.getOnDiskElements().setValueAsLong(statistics.getDiskStoreObjectCount());

        stats.getOffHeapHits().setValueAsLong(statistics.getOffHeapHits());
        stats.getOffHeapMisses().setValueAsLong(statistics.getOffHeapMisses());
        stats.getOffHeapElements().setValueAsLong(statistics.getOffHeapStoreObjectCount());

        stats.getAverageGetTime().setValueAsDouble(statistics.getAverageGetTime());
        stats.getAverageSearchTime().setValueAsLong(statistics.getAverageSearchTime());

        stats.getSearchesPerSecond().setValueAsLong(statistics.getSearchesPerSecond());
        stats.getEvictionCount().setValueAsLong(statistics.getEvictionCount());
        stats.getWriterQueueLength().setValueAsLong(statistics.getWriterQueueSize());
    }
618086
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        # IRQ plugin only available on GNU/Linux
        if not LINUX:
            return self.stats

        if self.input_method == 'local':
            # Grab the stats
            stats = self.irq.get()

        elif self.input_method == 'snmp':
            # not available
            pass

        # Get the TOP 5 (by rate/s)
        stats = sorted(stats,
                       key=operator.itemgetter('irq_rate'),
                       reverse=True)[:5]

        # Update the stats
        self.stats = stats

        return self.stats
32116
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        if self.input_method == 'local':
            # Update stats using the standard system lib
            stats = self.glancesgrabhddtemp.get()

        else:
            # Update stats using SNMP
            # Not available for the moment
            pass

        # Update the stats
        self.stats = stats

        return self.stats
1356632
def update(self):
        """"""
        self.filename = self.parent.info.dataset.filename

        self.chan = self.parent.info.dataset.header['chan_name']
        for chan in self.chan:
            self.idx_chan.addItem(chan)
721988
def update(self, **params):
        
        self._current_params = self._transform_params(**params)
        self._current_stats = ModelStats()
485045
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        if self.input_method == 'local':
            # Update stats
            self.glancesgrabbat.update()
            stats = self.glancesgrabbat.get()

        elif self.input_method == 'snmp':
            # Update stats using SNMP
            # Not avalaible
            pass

        # Update the stats
        self.stats = stats

        return self.stats
22430
def update(self, stats):
        """"""
        # Get the stats
        all_stats = stats.getAllExportsAsDict(plugin_list=self.plugins_to_export())

        # Init data with timestamp (issue#708)
        if self.first_line:
            csv_header = ['timestamp']
        csv_data = [time.strftime('%Y-%m-%d %H:%M:%S')]

        # Loop over plugins to export
        for plugin in self.plugins_to_export():
            if isinstance(all_stats[plugin], list):
                for stat in all_stats[plugin]:
                    # First line: header
                    if self.first_line:
                        csv_header += ('{}_{}_{}'.format(
                            plugin, self.get_item_key(stat), item) for item in stat)
                    # Others lines: stats
                    csv_data += itervalues(stat)
            elif isinstance(all_stats[plugin], dict):
                # First line: header
                if self.first_line:
                    fieldnames = iterkeys(all_stats[plugin])
                    csv_header += ('{}_{}'.format(plugin, fieldname)
                                   for fieldname in fieldnames)
                # Others lines: stats
                csv_data += itervalues(all_stats[plugin])

        # Export to CSV
        if self.first_line:
            self.writer.writerow(csv_header)
            self.first_line = False
        self.writer.writerow(csv_data)
        self.csv_file.flush()
212089
async def update(self):
        """"""
        status_data = await self._request('/status.json?show_avail=1')

        if status_data:
            self.status_data = status_data

            sensor_data = await self._request('/sensors.json')
            if sensor_data:
                self.sensor_data = sensor_data
132139
def update(self, **args):
        """"""
        data = {}
        for field in args:
            data[field] = args[field]

        super(Version, self).update(**data)
72752
def update(self):
        """"""
        parensemble = self.analysis_evensen()
        obsensemble  = self.forecast(parensemble=parensemble)
        # todo: check for phi improvement
        if True:
            self.obsensemble = obsensemble
            self.parensemble = parensemble

        self.iter_num += 1
79346
def update(self, duration):
        """"""
        if duration >= 0:
            self.histogram.update(duration)
            self.meter.mark()
863075
def merge(self, other):
        
        self.stats = set(self.stats)
        self.stats.update(set(other.stats))
        self.stats = list(self.stats)
        if other._error:
            self._error = True
199643
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        if import_error_tag:
            return self.stats

        if self.input_method == 'local':
            stats = get_smart_data()
        elif self.input_method == 'snmp':
            pass

        # Update the stats
        self.stats = stats

        return self.stats