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

FR: Directly attach a timing to a nested category #103

Open
fredrikekre opened this issue Nov 12, 2020 · 1 comment
Open

FR: Directly attach a timing to a nested category #103

fredrikekre opened this issue Nov 12, 2020 · 1 comment

Comments

@fredrikekre
Copy link
Contributor

Sometimes it would be nice to have something like

@timeit ["A", "1"] begin
    # ...
end

@timeit ["A", "2"] begin
    # ...
end

instead of having to write

@timeit "A" begin
    @timeit "1" begin
        # ...
    end
end

@timeit "A" begin
    @timeit "2" begin
        # ...
    end
end

or

@timeit "A" begin
    @timeit "1" begin
        # ...
    end

    @timeit "2" begin
        # ...
    end
end

if you don't have any other code in between "1" and "2".

@fredrikekre
Copy link
Contributor Author

fredrikekre commented Sep 28, 2021

Perhaps

@timeit to["A"] "1" begin
    # ...
end

@timeit to["A"] "2" begin
    # ...
end

for the explicit to case and

@timeit ["A"] "1" begin
    # ...
end

@timeit ["A"] "2" begin
    # ...
end

with the default timer?

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

1 participant