https://github.com/raitraidma/profiling
Profiling in Java with JProfiler
https://github.com/raitraidma/profiling
Last synced: about 1 year ago
JSON representation
Profiling in Java with JProfiler
- Host: GitHub
- URL: https://github.com/raitraidma/profiling
- Owner: raitraidma
- Created: 2019-06-06T20:02:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T22:01:05.000Z (over 6 years ago)
- Last Synced: 2025-01-11T06:13:23.734Z (about 1 year ago)
- Language: Java
- Size: 1.03 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java profiling demo project
## About
- Presentation is in `presentation` folder.
- It also contains `solutions.md` with fixes for demo project. **Do not peek in there before you have finished.**
- If you get stuck with fixing (not finding) problems, then there are some hints in `hints.md` file.
- `presentation` package contains examples for presentation.
- `lab` package contains code for hands-on lab.
- `lab` contains embedded PostgreSQL that will be downloaded when starting the project.
## Prerequisites
- Java 8
- Maven 3.6
- IntelliJ IDEA
- JProfiler 11
If you do not have IDE then you can:
- Open JProfiler
- `Start Center` > `New Session` > `New Session`
- Session type: `Launch`
- Main class or executable JAR: `target/profiling-1.0.jar`
- From `Java File Path` select `Source path` and select `src/main/java`
- In `Call tree filters` add package `lab`
## Statistics of demo data
```sql
select count(1) from author; -- 10
select count(1) from post; -- 1000
select count(1) from comment; -- 1 000 000
```
## Embedded PostgreSQL
- Host: 127.0.0.1
- Port: 15432
- Username: postgres
- Password: postgres
# Help
- If Embedded PostgreSQL is not shut down, then find process id (PID)
with `netstat -tulp | grep 15432` and kill it with `kill -9 `.