Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbench
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sami Evangelista
sbench
Compare revisions
f00be85499ce81d82f6176232e6b873013857e82 to b3d3e9974252d85e5da6da93a7f751fddf39f190
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
evangelista/sbench
Select target project
No results found
b3d3e9974252d85e5da6da93a7f751fddf39f190
Select Git revision
Branches
master
Swap
Target
evangelista/sbench
Select target project
evangelista/sbench
arias/sbench
2 results
f00be85499ce81d82f6176232e6b873013857e82
Select Git revision
Branches
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
parameter hash_dir for FileStorage
· d61eaa50
Sami Evangelista
authored
2 years ago
d61eaa50
parameter hash_dir for FileStorage
· b3d3e997
Sami Evangelista
authored
2 years ago
b3d3e997
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sbench/file_storage.py
+4
-5
4 additions, 5 deletions
sbench/file_storage.py
sbench/test_sbench.py
+2
-1
2 additions, 1 deletion
sbench/test_sbench.py
with
6 additions
and
6 deletions
sbench/file_storage.py
View file @
b3d3e997
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
sbench/test_sbench.py
View file @
b3d3e997
...
...
@@ -39,7 +39,8 @@ def mk_test_ls_benchmark() -> Benchmark:
"
recursive ==
'
recursive
'
=> dir !=
'
tmp
'"
],
"
storage
"
:
{
"
type
"
:
"
file
"
"
type
"
:
"
file
"
,
"
hash_dir
"
:
True
}
})
...
...
This diff is collapsed.
Click to expand it.