-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change result packaging to tar #130
Conversation
For the truncating test, the allowed filesize had to be increased, as tar has slightly larger overhead compared to zip and in the test that checks the results content, this had to be adapted to use tar as well |
src/command/execute_program.rs
Outdated
.arg(out_path) | ||
.arg("--junk-paths") | ||
.arg("--exclude") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we explicitly exclude "log"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad 😬 good catch, when zipping the --junk-paths
option is actually used for not storing the directory name only
src/command/execute_program.rs
Outdated
let path_to_res = format!("./archives/{}/results", res.program_id); | ||
let result = format!("{}", res.timestamp); | ||
let path_to_log = String::from("../../../data"); | ||
let log = format!("{}_{}.log", res.program_id, res.timestamp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use more self-explaining variable names (I know that it wasn't pretty previously either^^)
For strings that do not change, please use something like const SOME_NAME: &str = ...
. String::from
creates a heap allocated string which incurs unneeded overhead.
src/command/execute_program.rs
Outdated
.arg("-C") | ||
.arg(path_to_res) | ||
.arg(result) | ||
.arg("-C") | ||
.arg(path_to_log) | ||
.arg(log) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have the file paths specified directly, i.e. without changing directories with -C
, just to reduce the used strings a bit and make it more obvious what is included
29beea3
to
d73e0b5
Compare
d73e0b5
to
7b03a74
Compare
7b03a74
to
4fce424
Compare
I resolved the before mentioned things, we might consider a mixed approach down the line, where we remove the path to the specific files, should we be desperate to save a few bytes. |
No description provided.