-
Notifications
You must be signed in to change notification settings - Fork 11
basic docs on jbang usage #9
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to run it on my M1 mac book and it did not work properly.
After installing JBang and installing ap-loader on it, I got:
> jbang ap-loader@jvm-profiling-tools/ap-loader
/Users/I560383/.sdkman/candidates/java/20.ea.30-open/bin/java -classpath /Users/I560383/.jbang/cache/urls/8973817683a5f7eb03077bb812b49bf64b6d296ee3986c4208a97cde9850027f/ap-loader-all.jar one.profiler.AsyncProfilerLoader
Be aware that it is recommended to use run the JVM with the | ||
To run with JBang you can do `jbang ap-loader@jvm-profiling-tools/ap-loader` or install it as an application: | ||
|
||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make it a single command and the whole JBang part one paragraph
jbang app install ap-loader@jvm-profiling-tools/ap-loader | ||
``` | ||
|
||
and run it directly with `ap-loader` instead of `java -jar ap-loader.jar`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing, or I can just run ap-loader
directly in my shell?
README.md
Outdated
With JBang you can do: | ||
|
||
```sh | ||
java -javaagent:ap-loader@jvm-profiling-tools/ap-loader=start,event=cpu,file=profile.html <java arguments> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and it failed, but maybe I haven't setup JBang correctly.
The README would suggest that the user would be getting more information on running ap-loader with JBang at the async-profiler GitHub page.
Maybe leave out this paragraph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh - i typed it wrong ;)
Hmm. How did you install it? I think you hit the issue that someone (not me) submitted a bad formula to the main brew repo. Make sure to use one of the installs documented at jbang.dev/downloads |
I used brew, but now I used the > java -javaagent:ap-loader@jvm-profiling-tools/ap-loader=start,event=cpu,file=profile.html -jar ~/Downloads/ap-loader-2.8.3-all.jar
Error opening zip file or JAR manifest missing : ap-loader@jvm-profiling-tools/ap-loader
Error occurred during initialization of VM
agent library failed to init: instrument Any ideas? Being able to use |
you need to follow the docs and use This should do it:
|
I will merge it and modify the text afterward to fix the other issues I pointed out myself. |
here is a readme documenting how to use ap-loader jbang alias.
I would still encourage to create jvm-profilng-tools/jbang-catalog then instead of:
jbang ap-loader@jvm-profiling-tools/ap-loader
it would just bejbang ap-laoder@jvm-profiling-tools
.But anyhow - here is the doc for how it works with the alias inside the main repo.