Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baronfel/prom-net-test
test harness for investigating prometheus-net leaks
https://github.com/baronfel/prom-net-test
Last synced: 9 days ago
JSON representation
test harness for investigating prometheus-net leaks
- Host: GitHub
- URL: https://github.com/baronfel/prom-net-test
- Owner: baronfel
- Created: 2019-08-02T21:15:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-21T18:34:53.000Z (about 5 years ago)
- Last Synced: 2024-10-20T08:56:27.020Z (27 days ago)
- Language: F#
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample repo to work on prometheus-net issues
## building
`./build.sh` will
* build and publish the project
* build the dockerfile for the app
* start the container## testing
`./test.sh` will
* fire 100 requests to the running app's metrics endpoint
## debugging
Attach to the container:
```shell
docker exec -it prom-test /bin/bash
```Now you can take dumps easily using `dotnet dump` because in the container the app is always PID 1:
```shell
dotnet dump collect --process-id 1
```And you can analyze the app with `dotnet dump` as well:
```shell
dotnet dump analyze path/to/core/file
```If necessary, you can get symbols for the dump via `dotnet symbol`:
```shell
dotnet symbol path/to/core/file
```And finally you can launch lldb with the libsosplugin.so file already loaded:
```shell
lldb prometheus-net-example --core path/to/core/file
```## tracing
run the container via the `build.sh` script, but add `/bin/bash` to the end so that you launch into a shell.
Run the app, get the PID, start tracing:
```shell
./prometheus-net-example >/dev/null & export PROC_ID=$(echo "$!") && ~/.dotnet/tools/dotnet-trace collect --process-id $PROC_ID --format speedscope --output /output/trace
```load the `./output/trace.speedscope.json` file via speedscope.
see the single-thread