2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-24 19:04:02 +08:00

master: group results by hour, not by minute

This commit is contained in:
Sebastien Bourdeauducq 2016-04-15 01:13:53 +08:00
parent 49493d89cf
commit 848c86e8a4
3 changed files with 14 additions and 10 deletions

View File

@ -32,6 +32,8 @@ unreleased [2.x]
Please always include the console output when reporting a GUI crash.
* Closing the core device communications before pausing is done automatically.
Experiments no longer need to do it explicitly.
* The result folders are formatted "%Y-%m-%d/%H instead of "%Y-%m-%d/%H-%M".
(i.e. grouping by day and then by hour, instead of by day and then by minute)
unreleased [1.0rc3]

View File

@ -56,24 +56,26 @@ class RIDCounter:
day_folders = os.listdir(self.results_dir)
except:
return r
day_folders = filter(lambda x: re.fullmatch('\d\d\d\d-\d\d-\d\d', x),
day_folders = filter(
lambda x: re.fullmatch("\\d\\d\\d\\d-\\d\\d-\\d\\d", x),
day_folders)
for df in day_folders:
day_path = os.path.join(self.results_dir, df)
try:
minute_folders = os.listdir(day_path)
hm_folders = os.listdir(day_path)
except:
continue
minute_folders = filter(lambda x: re.fullmatch('\d\d-\d\d', x),
minute_folders)
for mf in minute_folders:
minute_path = os.path.join(day_path, mf)
hm_folders = filter(lambda x: re.fullmatch("\\d\\d(-\\d\\d)?", x),
hm_folders)
for hmf in hm_folders:
hm_path = os.path.join(day_path, hmf)
try:
h5files = os.listdir(minute_path)
h5files = os.listdir(hm_path)
except:
continue
for x in h5files:
m = re.fullmatch('(\d\d\d\d\d\d\d\d\d)-.*\.h5', x)
m = re.fullmatch(
"(\\d\\d\\d\\d\\d\\d\\d\\d\\d)-.*\\.h5", x)
if m is None:
continue
rid = int(m.group(1))

View File

@ -211,7 +211,7 @@ def main():
rid, obj["pipeline_name"], expid, obj["priority"])
dirname = os.path.join("results",
time.strftime("%Y-%m-%d", start_time),
time.strftime("%H-%M", start_time))
time.strftime("%H", start_time))
os.makedirs(dirname, exist_ok=True)
os.chdir(dirname)
exp_inst = exp(