def cpu_rtt(): host = server_ip prev_t = 0 rtt = pc.verbose_ping(host) next_t = psutil.cpu_percent(percpu=False) delta = abs(prev_t - next_t) prev_t = next_t x_axis.append(rtt) y_axis.append(delta)
def plot_graphs(host='35.196.51.199'): prev_t = 0 rtt = pc.verbose_ping(host) next_t = psutil.cpu_percent(percpu=False) delta = abs(prev_t - next_t) prev_t = next_t plot_resource_util(rtt, delta) plot_relative_frequency() plot_changing_freq() plot_local_cache_freq() plot_performance() plt.show()
def plot_graphs(): host = server_ip prev_t = 0 rtt = pc.verbose_ping(host) next_t = psutil.cpu_percent(percpu=False) delta = abs(prev_t - next_t) prev_t = next_t figure('Caching Results') plot_resource_util(rtt, delta) plot_relative_frequency() plot_changing_freq() plot_local_cache_freq() plot_performance() plt.show()
def get_rtt(host): rtt = pc.verbose_ping(host) return round(rtt, 4)
def get_rtt(host): rtt = pc.verbose_ping(host) if rtt: return round(rtt, 4) else: return get_rtt(host)
def get_rtt(host): rtt = pc.verbose_ping(host) return rtt
def get_delay(self, mec): rtt = pc.verbose_ping(mec) if rtt: return round(rtt, 4) else: return self.get_delay(mec)