From eec9e0a589f3253276e5856721f24eafd1cc6072 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Thu, 20 Mar 2014 17:15:14 -0700 Subject: [PATCH] switch back to old merge_site_statistics for demo --- planetstack/hpc_wizard/hpc_wizard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planetstack/hpc_wizard/hpc_wizard.py b/planetstack/hpc_wizard/hpc_wizard.py index d619f64..bb85847 100644 --- a/planetstack/hpc_wizard/hpc_wizard.py +++ b/planetstack/hpc_wizard/hpc_wizard.py @@ -96,7 +96,7 @@ class HpcWizard: else: site.availNodes.append(node) - def merge_site_statistics_old(self, sites): + def merge_site_statistics(self, sites): """ this does it based on the sumb of all bandwidth The issue here is that we the computed load reacts immediately to @@ -126,7 +126,7 @@ class HpcWizard: file("/tmp/scott2.txt","a").write("%s %d %0.2f %0.2f %0.2f %0.2f %d\n" % (site.name, site.bytes_sent, blue_load, red_load, site.hotness, time_delta, computed_duration)) - def merge_site_statistics(self, sites): + def merge_site_statistics_new(self, sites): """ This does it based on max load Advantage of this method is that since we're effectively reporting @@ -144,7 +144,7 @@ class HpcWizard: site.max_avg_bandwidth = site_dict[site.name]["max_avg_bandwidth"] site.bytes_sent = site_dict[site.name]["sum_bytes_sent"] - site.hotness = min(1.0, float(max(BLUE_LOAD, site.max_avg_bandwidth) - BLUE_LOAD) / RED_LOAD) + site.hotness = min(1.0, float(max(BLUE_LOAD, site.max_avg_bandwidth) - BLUE_LOAD) / (RED_LOAD-BLUE_LOAD)) site.load = int(site.max_avg_bandwidth*100/MAX_LOAD) # we still need site["bandwidth"] for the summary statistics -- 2.43.0