This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
sp-06/README.md

52 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

## Environment
```shell
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
```
## Agent
2023-12-13 10:41:52 +00:00
### Compile the agent as JAR
```shell
2024-01-03 09:14:18 +00:00
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
2023-12-13 10:41:52 +00:00
cd agent/src
find . -name '*.java' -print -exec javac -cp ../lib/\*:. -d ../../out/production/agent \{\} \;
2023-12-13 10:41:52 +00:00
cd ..
jar cfm agent.jar manifest.txt -C ../out/production/agent .
2024-01-03 09:14:18 +00:00
jar tf agent.jar
2023-12-13 10:41:52 +00:00
```
## Profiler
### Compile the profiler
```shell
2024-01-03 09:14:18 +00:00
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
cd profiler/src
find . -name '*.java' -print -exec javac -d ../../out/production/profiler \{\} \;
cd ../..
```
2023-12-19 15:27:18 +00:00
## Application
### Compile the application
```shell
2024-01-03 09:14:18 +00:00
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
2023-12-19 15:27:18 +00:00
cd application/src
find . -name '*.java' -print -exec javac -d ../../out/production/application \{\} \;
cd ../..
```
### Run application with agent
2023-12-13 10:41:52 +00:00
```shell
2024-01-03 09:14:18 +00:00
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
2023-12-19 15:27:18 +00:00
java -javaagent:agent/agent.jar=hello -cp out/production/application -Xbootclasspath/p:out/production/profiler ch.usi.inf.sp.dbi.Application
2023-12-13 10:41:52 +00:00
```