'Update quicklook stats using the input method.'

@GlancesPlugin._check_decorator
@GlancesPlugin._log_result_decorator
def update(self):

    self.reset()
    if (self.input_method == 'local'):
        self.stats['cpu'] = cpu_percent.get()
        self.stats['percpu'] = cpu_percent.get(percpu=True)
        self.stats['mem'] = psutil.virtual_memory().percent
        self.stats['swap'] = psutil.swap_memory().percent
    elif (self.input_method == 'snmp'):
        pass
    if cpuinfo_tag:
        cpu_info = cpuinfo.get_cpu_info()
        if (cpu_info is not None):
            self.stats['cpu_name'] = cpu_info['brand']
            self.stats['cpu_hz_current'] = cpu_info['hz_actual_raw'][0]
            self.stats['cpu_hz'] = cpu_info['hz_advertised_raw'][0]
    return self.stats
