Skip to content

Commit

Permalink
docs: updates examples with grafana/pyroscope, enforces consistent st…
Browse files Browse the repository at this point in the history
…yle (#2314)

* deletes old grafana-integration example

* deletes old rideshare-phlare example

* deletes old adhoc example

* deletes old auth-env-var example

* deletes old metrics-export example

* updates dotnet/fast-slow

* updates /dotnet/rideshare example

* updates /dotnet/web-new example

* updates /golang-push/rideshare example

* updates /golang-push/simple example

* updates /java/fib example

* updates /java-jfr/rideshare example

* updates /java/simple example

* updates /nodejs/express-ts example

* updates /nodejs/express-ts example

* updates /nodejs/express example

* updates /php-fpm example

* updates /php example

* moves php examples to one directory

* updates /python/rideshare/django example

* updates /python/rideshare/fastapi example

* updates /python/rideshare/flask example

* updates /python/simple example

* updates /ruby/rideshare example

* updates /ruby/rideshare_rails example

* updates /ruby/simple example

* updates /rust/rideshare example

* enforces consistent style for docker compose files

* updates image name in READMEs

* updates /base-url example

* deletes golang-pull/file example

* updates golang-pull/static example

* removes mattermost example

* removes consul example

* updates /node/express-pull example

* updates dotnet example README

* updates kubernetes example
  • Loading branch information
petethepig authored Aug 25, 2023
1 parent e40d9df commit 5807d76
Show file tree
Hide file tree
Showing 135 changed files with 372 additions and 5,359 deletions.
45 changes: 0 additions & 45 deletions examples/adhoc/AdhocPush.java

This file was deleted.

69 changes: 0 additions & 69 deletions examples/adhoc/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions examples/adhoc/adhoc-push.py

This file was deleted.

39 changes: 0 additions & 39 deletions examples/adhoc/adhoc-push.rb

This file was deleted.

38 changes: 0 additions & 38 deletions examples/adhoc/adhoc-spy.py

This file was deleted.

61 changes: 0 additions & 61 deletions examples/adhoc/pull/adhoc-pull.go

This file was deleted.

13 changes: 0 additions & 13 deletions examples/auth-env-var/docker-compose.yml

This file was deleted.

7 changes: 0 additions & 7 deletions examples/auth-env-var/server.yml

This file was deleted.

8 changes: 4 additions & 4 deletions examples/base-url/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3'
services:
pyroscope:
image: 'pyroscope/pyroscope:latest'
image: grafana/pyroscope
command:
- 'server'
environment:
PYROSCOPE_BASE_URL: /pyroscope
- -api.base-url
- /pyroscope

nginx:
image: nginx
ports:
Expand Down
23 changes: 1 addition & 22 deletions examples/dotnet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .NET Examples

The directory contains examples of how to run Pyroscop to profile .NET applications in Docker containers.
The directory contains examples of how to run Pyroscope to profile .NET applications in Docker containers.

### Fast-slow

Expand All @@ -10,30 +10,9 @@ The code is pretty self-explanatory: `Slow.Work` should take 80% of CPU time and
`Fast.Work`. You may ask why `Fast` and `Slow` classes are defined in separate namespaces. The fact is that Pyroscope
colors frames depending on the namespaces (for .NET traces), so they are defined in this way just for sake of demo ;)

In this example, the program is built as an executable (`/dotnet/example`), therefore `-spy-name dotnetspy` argument is
required to tell Pyroscope how to deal with the process:
> CMD ["pyroscope", "exec", "-spy-name", "dotnetspy", "/dotnet/example"]
To run the example execute the following commands:

```shell
# cd examples/dotnet/fast-slow
# docker-compose up
```

### Web

The example is a simple ASP.NET Core web app that enables you to observe how consumed CPU time is changed by making
HTTP requests to [http://localhost:5000](http://localhost:5000).

In contrast to the previous example, the application is built as a dynamic library (`/dotnet/example.dll`) and
runs with dotnet. This allows Pyroscope to automatically detect which kind of spy to use, making `-spy-name` option
unnecessary:
> CMD ["pyroscope", "exec", "dotnet", "/dotnet/example.dll"]
To run the example execute the following commands:

```shell
# cd examples/dotnet/web
# docker-compose up
```
Loading

0 comments on commit 5807d76

Please sign in to comment.