Skip to content
Snippets Groups Projects
Commit 85c7b0c5 authored by Maël Madon's avatar Maël Madon
Browse files

campaign1 revert to original state, create campaign2

parent c1850897
Branches
Tags
No related merge requests found
......@@ -17,16 +17,15 @@ random.seed(1997)
nb_expe = 50
start_dates = [random.randint(jun1, nov30 - 72 * 3600)
for _ in range(nb_expe)]
xp_a_relancer = [7, 26]
#xp_a_relancer = [7, 26]
with concurrent.futures.ProcessPoolExecutor() as executor:
instances = []
# for i in range(nb_expe):
for i in xp_a_relancer:
for i in range(nb_expe):
# for i in xp_a_relancer:
print(f"Submit expe {i}")
# start_instance(expe_num, start_date, prepare_workload, clean_log)
instances.append(executor.submit(start_instance, i, start_dates[i], False, True))
......
#!/usr/bin/env python3
import random
from time import *
import concurrent.futures
from instance1 import start_instance
# Prepare the start date samples
begin_trace = 1356994806 # according to original SWF header
jun1_unix_time = mktime(strptime('Sun Jun 1 00:00:00 2014'))
nov30_unix_time = mktime(strptime('Sun Nov 30 23:59:59 2014'))
jun1 = (int)(jun1_unix_time - begin_trace)
nov30 = (int)(nov30_unix_time - begin_trace)
random.seed(4186341)
nb_expe = 50
# TODO
# We fix the demand response window to be at 16 on day 2
# start_dates = [random.randint(jun1, nov30 - 72 * 3600)
# for _ in range(nb_expe)]
# with concurrent.futures.ProcessPoolExecutor() as executor:
# instances = []
# for i in range(nb_expe):
# print(f"Submit expe {i}")
# # start_instance(expe_num, start_date, prepare_workload, clean_log)
# instances.append(executor.submit(
# start_instance, i, start_dates[i], False, True))
# for instance in concurrent.futures.as_completed(instances):
# print(f"Expe {instance.result()} terminated")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment