Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • evangelista/sbench
  • arias/sbench
2 results
Show changes
Commits on Source (2)
......@@ -25,15 +25,14 @@ class FileStorage(Storage):
def _get_dir(self, run: 'Run') -> str:
sub_dirs = list(run.assign.values())
if not self.hash_dir:
result = os.path.join(*sub_dirs)
else:
if self.hash_dir:
hval = hashlib.sha256(
';'.join(sub_dirs).encode('utf-8')
).hexdigest()
result = os.path.join(hval[:2], hval[2:4], hval[4:])
result = os.path.join(self.bench.get_dir(), 'runs', result)
return result
else:
result = os.path.join(*sub_dirs)
return os.path.join(self.bench.get_dir(), 'runs', result)
def _get_mdata_file(self, run: 'Run') -> str:
return os.path.join(self._get_dir(run), '_mdata.json')
......
......@@ -39,7 +39,8 @@ def mk_test_ls_benchmark() -> Benchmark:
"recursive == 'recursive' => dir != 'tmp'"
],
"storage": {
"type": "file"
"type": "file",
"hash_dir": True
}
})
......