Skip to content
Snippets Groups Projects
Commit b8e54561 authored by jgatt's avatar jgatt
Browse files

New test for intervalset implementation

parent 813ca137
Branches
Tags
1 merge request!16Merge request multibehavior
{ {
"seed" : -3, "seed" : -3,
"red_windows" : [[200000, 201000], [201000, 202000], [202000, 203000], [203000, 204000], [204000, 205000], [205000, 206000], [206000, 207000], [207000, 208000], [208000, 209000], "red_windows" : [[200000, 201000], [201001, 202000], [202001, 203000], [203001, 204000], [204001, 205000],
[209000, 210000], [210000, 211000], [211000, 212000], [212000, 213000], [213000, 214000], [214000, 215000], [215000, 216000], [216000, 217000], [217000, 218000], [218000, 219000], [205001, 206000], [206001, 207000], [207001, 208000], [208001, 209000], [209001, 210000],
[219000, 220000], [220000, 221000], [221000, 222000], [222000, 223000], [223000, 224000], [224000, 225000], [225000, 226000], [226000, 227000], [227000, 228000], [228000, 229000], [210001, 211000], [211001, 212000], [212001, 213000], [213001, 214000], [214001, 215000],
[229000, 230000], [230000, 231000], [231000, 232000], [232000, 233000], [233000, 234000], [234000, 235000], [235000, 236000], [236000, 237000], [237000, 238000], [238000, 239000], [215001, 216000], [216001, 217000], [217001, 218000], [218001, 219000], [219001, 220000],
[239000, 240000], [240000, 241000], [241000, 242000], [242000, 243000], [243000, 244000], [244000, 245000], [245000, 246000], [246000, 247000], [247000, 248000], [248000, 249000], [220001, 221000], [221001, 222000], [222001, 223000], [223001, 224000], [224001, 225000],
[249000, 250000], [250000, 251000], [251000, 252000], [252000, 253000], [253000, 254000], [254000, 255000], [255000, 256000], [256000, 257000], [257000, 258000], [258000, 259000], [225001, 226000], [226001, 227000], [227001, 228000], [228001, 229000], [229001, 230000],
[259000, 260000], [260000, 261000], [261000, 262000], [262000, 263000], [263000, 264000], [264000, 265000], [265000, 266000], [266000, 267000], [267000, 268000], [268000, 269000], [230001, 231000], [231001, 232000], [232001, 233000], [233001, 234000], [234001, 235000],
[269000, 270000], [270000, 271000], [271000, 272000], [272000, 273000], [273000, 274000], [274000, 275000], [275000, 276000], [276000, 277000], [277000, 278000], [278000, 279000], [235001, 236000], [236001, 237000], [237001, 238000], [238001, 239000], [239001, 240000],
[279000, 280000], [280000, 281000], [281000, 282000], [282000, 283000], [283000, 284000], [284000, 285000], [285000, 286000], [286000, 287000], [287000, 288000], [288000, 289000], [240001, 241000], [241001, 242000], [242001, 243000], [243001, 244000], [244001, 245000],
[289000, 290000], [290000, 291000], [291000, 292000], [292000, 293000], [293000, 294000], [294000, 295000], [295000, 296000], [296000, 297000], [297000, 298000], [298000, 299000], [245001, 246000], [246001, 247000], [247001, 248000], [248001, 249000], [249001, 250000],
[299000, 300000]], [250001, 251000], [251001, 252000], [252001, 253000], [253001, 254000], [254001, 255000],
[255001, 256000], [256001, 257000], [257001, 258000], [258001, 259000], [259001, 260000],
[260001, 261000], [261001, 262000], [262001, 263000], [263001, 264000], [264001, 265000],
[265001, 266000], [266001, 267000], [267001, 268000], [268001, 269000], [269001, 270000],
[270001, 271000], [271001, 272000], [272001, 273000], [273001, 274000], [274001, 275000],
[275001, 276000], [276001, 277000], [277001, 278000], [278001, 279000], [279001, 280000],
[280001, 281000], [281001, 282000], [282001, 283000], [283001, 284000], [284001, 285000],
[285001, 286000], [286001, 287000], [287001, 288000], [288001, 289000], [289001, 290000],
[290001, 291000], [291001, 292000], [292001, 293000], [293001, 294000], [294001, 295000],
[295001, 296000], [296001, 297000], [297001, 298000], [298001, 299000], [299001, 300000]]
,
"users": [ "users": [
{ {
"name": "user14", "name": "user14",
......
{
"seed" : -3,
"red_windows" : [[200000, 201000], [201000, 202000], [202000, 203000], [203000, 204000], [204000, 205000], [205000, 206000], [206000, 207000], [207000, 208000], [208000, 209000],
[209000, 210000], [210000, 211000], [211000, 212000], [212000, 213000], [213000, 214000], [214000, 215000], [215000, 216000], [216000, 217000], [217000, 218000], [218000, 219000],
[219000, 220000], [220000, 221000], [221000, 222000], [222000, 223000], [223000, 224000], [224000, 225000], [225000, 226000], [226000, 227000], [227000, 228000], [228000, 229000],
[229000, 230000], [230000, 231000], [231000, 232000], [232000, 233000], [233000, 234000], [234000, 235000], [235000, 236000], [236000, 237000], [237000, 238000], [238000, 239000],
[239000, 240000], [240000, 241000], [241000, 242000], [242000, 243000], [243000, 244000], [244000, 245000], [245000, 246000], [246000, 247000], [247000, 248000], [248000, 249000],
[249000, 250000], [250000, 251000], [251000, 252000], [252000, 253000], [253000, 254000], [254000, 255000], [255000, 256000], [256000, 257000], [257000, 258000], [258000, 259000],
[259000, 260000], [260000, 261000], [261000, 262000], [262000, 263000], [263000, 264000], [264000, 265000], [265000, 266000], [266000, 267000], [267000, 268000], [268000, 269000],
[269000, 270000], [270000, 271000], [271000, 272000], [272000, 273000], [273000, 274000], [274000, 275000], [275000, 276000], [276000, 277000], [277000, 278000], [278000, 279000],
[279000, 280000], [280000, 281000], [281000, 282000], [282000, 283000], [283000, 284000], [284000, 285000], [285000, 286000], [286000, 287000], [287000, 288000], [288000, 289000],
[289000, 290000], [290000, 291000], [291000, 292000], [292000, 293000], [293000, 294000], [294000, 295000], [295000, 296000], [296000, 297000], [297000, 298000], [298000, 299000],
[299000, 300000]],
"users": [
{
"name": "user14",
"category": "dm_user_multi_behavior",
"param": {
"input_json": "test/workloads/dyn/user14.json",
"red_prob_rigid" : 0.2,
"red_prob_degrad" : 0.2,
"red_prob_reconfig" : 0.2,
"red_prob_renonce" : 0.2,
"red_prob_see_you_later": 0.2,
"yellow_prob_degrad" : 0.3,
"yellow_prob_reconfig" : 0.3,
"yellow_prob_rigid" : 0.3
}
},
{
"name": "user15",
"category": "dm_user_multi_behavior",
"param": {
"input_json": "test/workloads/dyn/user15.json",
"red_prob_rigid" : 0.2,
"red_prob_degrad" : 0.2,
"red_prob_reconfig" : 0.2,
"red_prob_renonce" : 0.2,
"red_prob_see_you_later": 0.2,
"yellow_prob_degrad" : 0.3,
"yellow_prob_reconfig" : 0.3,
"yellow_prob_rigid" : 0.3
}
},
{
"name": "user16",
"category": "dm_user_multi_behavior",
"param": {
"input_json": "test/workloads/dyn/user16.json",
"red_prob_rigid" : 0.2,
"red_prob_degrad" : 0.2,
"red_prob_reconfig" : 0.2,
"red_prob_renonce" : 0.2,
"red_prob_see_you_later": 0.2,
"yellow_prob_degrad" : 0.3,
"yellow_prob_reconfig" : 0.3,
"yellow_prob_rigid" : 0.3
}
},
{
"name": "user18",
"category": "dm_user_multi_behavior",
"param": {
"input_json": "test/workloads/dyn/user18.json",
"red_prob_rigid" : 0.2,
"red_prob_degrad" : 0.2,
"red_prob_reconfig" : 0.2,
"red_prob_renonce" : 0.2,
"red_prob_see_you_later": 0.2,
"yellow_prob_degrad" : 0.3,
"yellow_prob_reconfig" : 0.3,
"yellow_prob_rigid" : 0.3
}
}
]
}
\ No newline at end of file
...@@ -103,7 +103,7 @@ def test_error_invalid_window_order(platform_multiC) : ...@@ -103,7 +103,7 @@ def test_error_invalid_window_order(platform_multiC) :
invalid_window =invalid_windows_list[i] invalid_window =invalid_windows_list[i]
make_error_file(3,invalid_window) make_error_file(3,invalid_window)
out_dir = error_user("dm_user_multi_behavior_invalid_windows_order_"+str(i),platform_multiC, "should be sorted and contains disjoint interval") out_dir = error_user("dm_user_multi_behavior_invalid_windows_order_"+str(i),platform_multiC, "should be sorted and contains disjoint interval")
out_dir_2 = error_user("dm_user_multi_behavior_many_windows", platform_multiC,schedconf="test/schedconf/dm_user_multi_behavior_many_windows.json") out_dir_2 = error_user("dm_user_multi_behavior_many_windows_wrong", platform_multiC,schedconf="test/schedconf/dm_user_multi_behavior_many_windows_wrong.json")
out_dir_3 = error_user("dm_user_multi_behavior_many_windows_wrong_order", platform_multiC,schedconf="test/schedconf/dm_user_multi_behavior_many_windows_wrong_order.json") out_dir_3 = error_user("dm_user_multi_behavior_many_windows_wrong_order", platform_multiC,schedconf="test/schedconf/dm_user_multi_behavior_many_windows_wrong_order.json")
def test_error_invalid_window_type(platform_multiC) : def test_error_invalid_window_type(platform_multiC) :
invalid_windows_list = [[[0]], [[0.0, 1.0]], [[0, 1, 2]], [[0, 1], [2, 3], [4, 5], 5], [[1, 4.0]], [[1.0, 4]]] invalid_windows_list = [[[0]], [[0.0, 1.0]], [[0, 1, 2]], [[0, 1], [2, 3], [4, 5], 5], [[1, 4.0]], [[1.0, 4]]]
......
...@@ -78,6 +78,12 @@ def test_speedup(): ...@@ -78,6 +78,12 @@ def test_speedup():
def test_dm_user_multi_behavior(platform_multiC) : def test_dm_user_multi_behavior(platform_multiC) :
out_dir_1 = run_user("dm_user_multi_behavior", platform_multiC) out_dir_1 = run_user("dm_user_multi_behavior", platform_multiC)
out_dir_2 = run_user("dm_user_multi_behavior_many_windows",platform_multiC)
with open(f"{out_dir_1}/_jobs.csv") as job_file_1 :
job_line_1 = job_file_1.readlines()
with open(f"{out_dir_2}/_jobs.csv") as job_file_2 :
job_line_2 = job_file_2.readlines()
assert job_line_1 == job_line_2
def test_dm_user_multi_behavior_yellow(platform_multiC) : def test_dm_user_multi_behavior_yellow(platform_multiC) :
run_user("dm_user_multi_behavior_yellow",platform_multiC) run_user("dm_user_multi_behavior_yellow",platform_multiC)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment