Infer better names
I was first curious if it was possible to easily modify things to use the full paths of items (module::fn_name instead of fn_name), but asking on #rust-internals, that may be impossible. So I guess perhaps an alternate scheme would be to allow an argument to the attribute, specifying a name.
#[flame("module::fn_name")]
fn fn_name() {}
I think that would be a really useful feature (especially if it wasn't applied recursively), perhaps deserving a different attribute.
I've been pondering with the same issue a week ago. While an automated approach would obviously be the preferred way, I'd consider an optional label a worthy workaround.
I am however not sure if it really is impossible. At a quick glance I'd argue that my apply_attr does something similar. Rules are applied recursively, carrying along all kinds of meta-information. Why shouldn't we be able to carry along the current parent path?
I was trying to use flamer with project that uses specs and annotated all systems run methods with flame, but because all of the methods have the same name the resulting data is basically useless.
So I cannot use flamer without this something like this.
I think we should be able to do this, at the expense of requiring a global #![flamer] annotation. Then we'd just keep a stack of modules, etc. and prepend that (joined by"::") to each name.