Home | Trees | Indices | Help |
|
---|
|
1 import datetime 2 3 from starcluster.balancers import sge 4 from starcluster.tests import StarClusterTest 5 from starcluster.tests.templates import sge_balancer 6 79 stat_hash = None 10 host_hash = {} 116213 stat = sge.SGEStats() 14 self.host_hash = stat.parse_qhost(sge_balancer.qhost_xml) 15 assert len(self.host_hash) == 3 16 assert len(self.host_hash) == stat.count_hosts() 17 assert stat.count_total_slots() == 3 18 assert stat.slots_per_host() == 11921 stat = sge.SGEStats() 22 self.host_hash = stat.parse_qhost(sge_balancer.loaded_qhost_xml) 23 assert len(self.host_hash) == 10 24 assert len(self.host_hash) == stat.count_hosts() 25 assert stat.count_total_slots() == 80 26 assert stat.slots_per_host() == 82729 stat = sge.SGEStats() 30 self.stat_hash = stat.parse_qstat(sge_balancer.qstat_xml) 31 assert len(self.stat_hash) == 23 32 assert stat.first_job_id == 1 33 assert stat.last_job_id == 23 34 assert len(stat.get_queued_jobs()) == 20 35 assert len(stat.get_running_jobs()) == 3 36 assert stat.num_slots_for_job(21) == 1 37 oldest = datetime.datetime(2010, 6, 18, 23, 39, 14) 38 assert stat.oldest_queued_job_age() == oldest3941 stat = sge.SGEStats() 42 now = datetime.datetime.utcnow() 43 self.jobstats = stat.parse_qacct(sge_balancer.qacct_txt, now) 44 assert stat.avg_job_duration() == 90 45 assert stat.avg_wait_time() == 2634648 stat = sge.SGEStats() 49 self.stat_hash = stat.parse_qstat(sge_balancer.loaded_qstat_xml) 50 assert len(self.stat_hash) == 192 51 assert stat.first_job_id == 385 52 assert stat.last_job_id == 576 53 assert len(stat.get_queued_jobs()) == 188 54 assert len(stat.get_running_jobs()) == 4 55 assert stat.num_slots_for_job(576) == 20 56 oldest = datetime.datetime(2010, 7, 8, 4, 40, 32) 57 assert stat.oldest_queued_job_age() == oldest58
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jan 3 23:11:49 2012 | http://epydoc.sourceforge.net |