Skip to content
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

Merged
merged 10 commits into from
Jan 3, 2024
Merged

Conversation

florg-32
Copy link
Collaborator

@florg-32 florg-32 commented Dec 9, 2023

No description provided.

@florg-32
Copy link
Collaborator Author

florg-32 commented Dec 9, 2023

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

.arg(out_path)
.arg("--junk-paths")
.arg("--exclude")
Copy link
Collaborator Author

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"?

Copy link
Collaborator

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

Comment on lines 153 to 158
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);
Copy link
Collaborator Author

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.

Comment on lines 162 to 169
.arg("-C")
.arg(path_to_res)
.arg(result)
.arg("-C")
.arg(path_to_log)
.arg(log)
Copy link
Collaborator Author

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

@florg-32 florg-32 force-pushed the 100-change-result-packaging-to-tar branch from 29beea3 to d73e0b5 Compare December 9, 2023 13:27
@florg-32 florg-32 force-pushed the 100-change-result-packaging-to-tar branch from d73e0b5 to 7b03a74 Compare January 1, 2024 12:51
@florg-32 florg-32 force-pushed the 100-change-result-packaging-to-tar branch from 7b03a74 to 4fce424 Compare January 1, 2024 13:25
@florg-32
Copy link
Collaborator Author

florg-32 commented Jan 1, 2024

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.

@florg-32 florg-32 merged commit a54f95c into rust_dev Jan 3, 2024
2 checks passed
@florg-32 florg-32 linked an issue Jan 5, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change result packaging to tar
2 participants