Beispiel #1
0
 def is_cycle_unchanged(self, cycle: int) -> bool:
     """Returns True if |cycle| is unchanged according to the
     unchanged-cycles file. This file is written to by the trial's runner."""
     if not os.path.exists(self.unchanged_cycles_path):
         return False
     unchanged_cycles = filesystem.read(
         self.unchanged_cycles_path).splitlines()
     return str(cycle) in unchanged_cycles
Beispiel #2
0
 def get_measured_files(self):
     """Returns a the set of files that have been measured for this
     snapshot's trials."""
     if not os.path.exists(self.measured_files_path):
         return set()
     return set(filesystem.read(self.measured_files_path).splitlines())
Beispiel #3
0
 def get_unchanged_cycles():
     return [
         int(cycle) for cycle in filesystem.read(
             self.unchanged_cycles_path).splitlines()
     ]