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

Avoid colons in trace file names #47

Merged
merged 1 commit into from
Aug 17, 2021
Merged

Avoid colons in trace file names #47

merged 1 commit into from
Aug 17, 2021

Conversation

cmyr
Copy link
Owner

@cmyr cmyr commented Aug 17, 2021

This is not an allowed character in filenames on macOS.

cc @ckoehler, @teymour-aldridge , does this patch work for you?

( to test: check out this branch, then do cargo install --path ., and then use cargo instruments as before).

This is not an allowed character in filenames on macOS.
@ckoehler
Copy link

No, it actually doesn't, still can't open it. I noticed that the created file/dir is only 53 kB, whereas the output trace with a direct instruments call is 26 M or so. Incidentally, opening that one doesn't do what I expect it to, either, so I've just been running Instruments and opening my app manually, which works fine.

Thank you for looking into this, and sorry for adding to the noise; I'll bow out at this point. Feel free to ignore my comments.

@cmyr
Copy link
Owner Author

cmyr commented Aug 17, 2021

@ckoehler I'd still like to know what's going on. Is the crate you're profiling something you are able to share with me?

edit: or more to the point: does this problem occur for all crates?

@ckoehler
Copy link

Sorry, I cannot share it, it's internal. It's a Rocket REST API app. Behavior is the same with another internal project, a command line utility. A blind guess: maybe it's related to how you spawn the instruments process?

@cmyr
Copy link
Owner Author

cmyr commented Aug 17, 2021

I'd love to figure out if this is a problem with specific projects, or if it's a problem with your environment, if you have a chance to try cargo instruments on some publicly available code that would be helpful.

If you don't have anything handy, something I just tested was one of the examples in [piet]:(https://github.com/linebender/piet)

git checkout https://github.com/linebender/piet.git
cd piet/piet-common
cargo instruments -t time --example=mondrian --features png

does this work for you?

@cmyr
Copy link
Owner Author

cmyr commented Aug 17, 2021

In any case I'm going to merge this since I think it's still an improvement, and I'll move this discussion to #41

@cmyr cmyr merged commit c1deb9b into master Aug 17, 2021
@cmyr cmyr deleted the template-name branch August 17, 2021 19:29
kraktus added a commit to kraktus/cargo-instruments that referenced this pull request Jun 11, 2022
Also update example trace file name, since Semicolons are not used anymore: cmyr#47
kraktus added a commit to kraktus/cargo-instruments that referenced this pull request Jun 11, 2022
Also update example trace file name, since colons are not used anymore: cmyr#47
kraktus added a commit to kraktus/cargo-instruments that referenced this pull request Jun 11, 2022
Also update example trace file name, since colons are not used anymore: cmyr#47
kraktus added a commit to kraktus/cargo-instruments that referenced this pull request Jun 11, 2022
Also update example trace file name, since colons are not used anymore: cmyr#47.
cmyr pushed a commit that referenced this pull request Jun 15, 2022
Also update example trace file name, since colons are not used anymore: #47.
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.

2 participants