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

Inconsistent escaping of directory names #189

Closed
RReverser opened this issue Aug 17, 2018 · 1 comment
Closed

Inconsistent escaping of directory names #189

RReverser opened this issue Aug 17, 2018 · 1 comment
Milestone

Comments

@RReverser
Copy link
Contributor

This is similar to #182, but I've noticed few more issues when running benchmarks. Here is a simple reproducible example:

fn bench(c: &mut Criterion) {
    c.bench_function_over_inputs("t{e.s/t", |b, i| b.iter(|| i), &[
        "a/b",
        "c{d"
    ]);
}

This creates following directory structure:

target/criterion/
├── report
├── t{e.s
│   └── t
│       └── report
└── t{e_s_t
    ├── _a_b_
    │   ├── base
    │   ├── new
    │   └── report
    └── _c{d_
        ├── base
        ├── new
        └── report

Why top-level directories for general report and parametrised reports are escaped differently? Which one is correct - is / supposed to be treated as subdirectory in benchmark names or should it be escaped? Note that it's not escaped with non-parametrised benchmark_function as well.

@RReverser
Copy link
Contributor Author

Same for group names:

fn bench(c: &mut Criterion) {
    c.bench("g.r{ou/p", ParameterizedBenchmark::new("t{e.s/t", |b, i| b.iter(|| i), &[
        "a/b",
        "c{d"
    ]));
}
target/criterion/
├── g.r{ou
│   └── p
│       ├── report
│       └── t{e.s
│           └── t
│               └── report
├── g_r{ou_p
│   └── t{e_s_t
│       ├── _a_b_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       └── _c{d_
│           ├── base
│           ├── new
│           └── report
└── report

RReverser added a commit to RReverser/criterion.rs that referenced this issue Aug 17, 2018
Fixes various issues related to directory name escaping.

Before:
```
├── g.r{ou
│   └── p
│       ├── report
│       └── t{e.s
│           └── t
│               └── report
├── g_r{ou_p
│   └── t{e_s_t
│       ├── _a_b_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       └── _c{d_
│           ├── base
│           ├── new
│           └── report
└── report
```

After:
```
├── g_r{ou_p
│   ├── report
│   └── t{e_s_t
│       ├── _a_b_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       ├── _c{d_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       └── report
└── report
```

Fixes bheisler#189.
RReverser added a commit to RReverser/criterion.rs that referenced this issue Aug 17, 2018
Fixes various issues related to directory name escaping.

Before:
```
├── g.r{ou
│   └── p
│       ├── report
│       └── t{e.s
│           └── t
│               └── report
├── g_r{ou_p
│   └── t{e_s_t
│       ├── _a_b_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       └── _c{d_
│           ├── base
│           ├── new
│           └── report
└── report
```

After:
```
├── g_r{ou_p
│   ├── report
│   └── t{e_s_t
│       ├── _a_b_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       ├── _c{d_
│       │   ├── base
│       │   ├── new
│       │   └── report
│       └── report
└── report
```

Fixes bheisler#189.
@bheisler bheisler added this to the Version 0.2.5 milestone Aug 18, 2018
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

No branches or pull requests

2 participants