dinghy
dinghy copied to clipboard
Benchmarking errors due to insufficient permissions for using Criterion
Hi again!) Probably minor thing but I'm getting errors due to insufficient permissions when using Criterion on iOS. Would be nice to fix it either with optional parameter or simply by providing sufficient permissions to the Dinghy app. Again - if I will be faster will gladly do PR with fix, but you guys are welcome to overtake 😉
Benchmarking keygen: AnalyzingCriterion.rs ERROR: error: Failed to access file "target/criterion/keygen/new": Operation not permitted (os error 1)
Criterion.rs ERROR: error: Failed to access file "target/criterion/keygen/new/tukey.json": No such file or directory (os error 2)
Criterion.rs ERROR: error: Failed to access file "target/criterion/keygen/new/sample.json": No such file or directory (os error 2)
Criterion.rs ERROR: error: Failed to access file "target/criterion/keygen/new/estimates.json": No such file or directory (os error 2)
@vhnatyk The benchmark files are written to $CRITERION_HOME/{crate name}/{bench name}/
where the default of CRITERION_HOME
is $CARGO_TARGET_DIR/criterion/
. It is likely on iOS that we need to override $CARGO_TARGET_DIR
to point to a (temporary) directory into which we can create subdirectories and write files. Ideally:
- Before running the executable, dinghy would mirror everything (recursively) in
$CARGO_TARGET_DIR/critereon
to that temporary directory. - dinghy would then spawn the executable on that device with
$CARGO_TARGET_DIR
pointing to that temporary directory - dinghy would then mirror the files in the temporary directory back into
$CARGO_TARGET_DIR/critereon
.
We'd need some way to configure dinghy regarding which files/directories to mirror this way.