Пример #1
0
    def test_produce_inter_times(self):
        created_values = [160, 220, 340, 340, 527]
        inter_values = produce_inter_times(created_values)
        self.assertEqual(
            inter_values, [60, 120, 0, 187], "Error calculating"
            "inter arrival times from jobs' created times")

        self.assertRaises(ValueError, produce_inter_times, [20, 30, 20])
Пример #2
0
 def _populate_inter_generator(self, create_times):
     
     inter_times = produce_inter_times(create_times, 
                                       max_filter=self._inter_times_filter)
     
     bins, edges = calculate_histogram(inter_times, interval_size=1)
     # Any number is good, with decimals
     
     return calculate_probability_map(bins, edges,
                                      interval_policy="absnormal")
Пример #3
0
profile_compare(logs_dic["totalcores"],
                trace_dic["totalcores"],
                "Edison logs vs. synth\nJobs' allocated number of cores",
                "./graphs/edison-compare-cores",
                "Number of cores",
                x_log_scale=True,
                filterCut=100000)

trace_dic["wallclock_requested"] = [
    x * 60 for x in trace_dic["wallclock_requested"]
]
profile_compare(logs_dic["wallclock_requested"],
                trace_dic["wallclock_requested"],
                "Edison logs vs. synth\nJobs' wall clock limit(s)",
                "./graphs/edison-compare-limit",
                "Wall clock limit(s)",
                x_log_scale=True,
                filterCut=1000000)

inter_data_logs = jobAnalysis.produce_inter_times(logs_dic["created"])
inter_data_trace = jobAnalysis.produce_inter_times(trace_dic["created"])

profile_compare(inter_data_logs,
                inter_data_trace,
                "Edison logs vs. synth\nJobs' inter-arrival time(s)",
                "./graphs/edison-compare-inter",
                "Inter-arrival time(s)",
                x_log_scale=False,
                filterCut=20)
Пример #4
0
                     "containing the trace.")

print("LOADING DATA")
data_dic = jobAnalysis.get_jobs_data_trace("./data/edison-1000jobs.trace")

profile(data_dic["duration"],
        "Trace\nJobs' wall clock (s)",
        "./graphs/trace-duration",
        "Wall clock (s)",
        x_log_scale=True)

profile(data_dic["totalcores"],
        "Trace\nJobs' allocated number of cores",
        "./graphs/trace-cores",
        "Number of cores",
        x_log_scale=True)

profile(data_dic["wallclock_requested"], "Trace\nJobs' "
        "wall clock limit(min)",
        "./graphs/trace-limit",
        "Wall clock limit(min)",
        x_log_scale=True)

inter_data = jobAnalysis.produce_inter_times(data_dic["created"])

profile(inter_data,
        "Trace\nJobs' inter-arrival time(s)",
        "./graphs/trace-inter",
        "Inter-arrival time(s)",
        x_log_scale=True)