def setUp(self):
     example_dir = get_script_dir()
     self.nolock_example_1 = example_dir + "/nolock_example_1"
     self.nolock_example_2 = example_dir + "/nolock_example_2"
     results = nolock_example([self.nolock_example_1, self.nolock_example_2])
     self.distilled = []
     for (name, clusts) in results:
         if clusts is None:
             self.distilled.append((name, None))
         else:
             new_distilled = []
             for clust in clusts:
                 new_distilled += [task.response_time - task.deadline for task in clust]
             self.distilled.append((name, new_distilled))
Beispiel #2
0
 def setUp(self):
     example_dir = get_script_dir()
     self.nolock_example_1 = example_dir + "/nolock_example_1"
     self.nolock_example_2 = example_dir + "/nolock_example_2"
     results = nolock_example([self.nolock_example_1, self.nolock_example_2])
     self.distilled = []
     for (name, clusts) in results:
         if clusts is None:
             self.distilled.append((name, None))
         else:
             new_distilled = []
             for clust in clusts:
                 new_distilled += [task.response_time - task.deadline
                                  for task in clust]
             self.distilled.append((name, new_distilled))
Beispiel #3
0
#Necessary includes and stuff

from example.driver import nolock_example, lock_example, \
                           generate_random_nolock_sets, \
                           generate_random_lock_sets, print_bounds

if __name__ == '__main__':
    #Actually run examples when this script is executed
    print "Running non-lock example"
    print_bounds(nolock_example(generate_random_nolock_sets()))
    print "Running lock example"
    print_bounds(lock_example(generate_random_lock_sets()))
Beispiel #4
0
#Necessary includes and stuff

from example.driver import nolock_example, lock_example, \
                           generate_random_nolock_sets, \
                           generate_random_lock_sets, print_bounds

if __name__ == '__main__':
    #Actually run examples when this script is executed
    print("Running non-lock example")
    print_bounds(nolock_example(generate_random_nolock_sets()))
    print("Running lock example")
    print_bounds(lock_example(generate_random_lock_sets()))