Skip to content

Commit

Permalink
Dynamically resizes cache depending on the amount of RAM available (i…
Browse files Browse the repository at this point in the history
…ssue #167) (#213)

Co-authored-by: alonlong <alonlong@163.com>
Co-authored-by: Dmitry Filimonov <dmitry@pyroscope.io>
  • Loading branch information
3 people committed Jun 11, 2021
1 parent a5cf54a commit 764de1d
Show file tree
Hide file tree
Showing 47 changed files with 2,364 additions and 308 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ pkged.go
.vscode
vendor/
benchmark/git-info.env
benchmark/.env
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ COPY --from=phpspy-builder /var/www/html/phpspy/libphpspy.a /opt/pyroscope/third
COPY --from=js-builder /opt/pyroscope/webapp/public ./webapp/public
COPY Makefile ./
COPY tools ./tools
COPY scripts ./scripts
COPY go.mod go.sum pyroscope.go ./
RUN make install-dev-tools

COPY pkg ./pkg
COPY cmd ./cmd
COPY scripts ./scripts

RUN EMBEDDED_ASSETS_DEPS="" EXTRA_LDFLAGS="-linkmode external -extldflags '-static'" make build-release

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ docker-dev:

.PHONY: windows-dev
windows-dev:
docker build -f Dockerfile.windows --output type=local,dest=out .
docker build --platform linux/amd64 -f Dockerfile.windows --output type=local,dest=out .
12 changes: 9 additions & 3 deletions benchmark/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ services:

pyroscope:
environment:
- PYROSCOPE_LOG_LEVEL=debug
- PYROSCOPE_LOG_LEVEL=info
- PYROSCOPE_WAIT_AFTER_STOP=true
build:
context: ../
dockerfile: Dockerfile
Expand All @@ -23,13 +24,14 @@ services:
deploy:
resources:
limits:
cpus: 1
memory: 512M
cpus: "${PYROSCOPE_CPUS}"
memory: "${PYROSCOPE_MEMORY}"

prometheus:
image: prom/prometheus:v2.27.1
volumes:
- ./prometheus:/etc/prometheus/
- data-prometheus:/prometheus
ports:
- 9090:9090

Expand All @@ -40,3 +42,7 @@ services:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
ports:
- 8080:3000

volumes:
data-prometheus:
driver: local

0 comments on commit 764de1d

Please sign in to comment.