Skip to content

Commit

Permalink
chore: add memory analysis tool
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Oct 26, 2023
1 parent 553c1c5 commit 465442f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ RUN for binary in "/bin/ping" "/bin/ping6" "/usr/bin/git" /app/bin/* /usr/libexe
xargs -I % sh -c 'mkdir -p $(dirname deps%); cp % deps%;' || true; \
done

RUN touch /app/memory.alys
RUN chown 10001 /app/memory.alys

# Build a minimal docker image
FROM scratch
WORKDIR /
Expand Down Expand Up @@ -80,6 +83,7 @@ COPY --from=build /usr/libexec/git-core/ /usr/libexec/git-core/
# Copy the app into place
COPY --from=build /app/deps /
COPY --from=build /app/bin /
COPY --from=build /app/memory.alys /memory.alys

# Use an unprivileged user.
USER appuser:appuser
Expand Down
18 changes: 13 additions & 5 deletions shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ shards:
git: https://github.com/spider-gazelle/active-model.git
version: 4.3.2

alys:
git: https://git.sr.ht/~refi64/alys
version: 0.2.0

ameba:
git: https://github.com/crystal-ameba/ameba.git
version: 1.5.0
Expand Down Expand Up @@ -169,6 +173,10 @@ shards:
git: https://github.com/luckyframework/lucky_router.git
version: 0.5.2

msgpack:
git: https://github.com/crystal-community/msgpack-crystal.git
version: 1.3.4

murmur3:
git: https://github.com/aca-labs/murmur3.git
version: 0.1.1+git.commit.7cbe25c0ca8d052c9d98c377c824dcb0e038c790
Expand All @@ -183,7 +191,7 @@ shards:

office365:
git: https://github.com/placeos/office365.git
version: 1.23.0
version: 1.23.2

open_api:
git: https://github.com/elbywan/open_api.cr.git
Expand Down Expand Up @@ -255,7 +263,7 @@ shards:

placeos-driver:
git: https://github.com/placeos/driver.git
version: 6.9.9
version: 6.9.14

placeos-frontend-loader:
git: https://github.com/placeos/frontend-loader.git
Expand All @@ -267,7 +275,7 @@ shards:

placeos-models:
git: https://github.com/placeos/models.git
version: 9.25.0
version: 9.25.2

placeos-resource:
git: https://github.com/place-labs/resource.git
Expand All @@ -281,7 +289,7 @@ shards:
git: https://github.com/spider-gazelle/promise.git
version: 3.0.0

protobuf:
protobuf: # Overridden
git: https://github.com/jeromegn/protobuf.cr.git
version: 2.3.0

Expand Down Expand Up @@ -315,7 +323,7 @@ shards:

search-ingest:
git: https://github.com/placeos/search-ingest.git
version: 2.10.4+git.commit.ad86e414f43fa5debb28192b0a01c7d3f655ce28
version: 2.11.0+git.commit.0014d0541f341af6e011b645d1975d3c452a3794

secrets-env: # Overridden
git: https://github.com/spider-gazelle/secrets-env.git
Expand Down
4 changes: 4 additions & 0 deletions shard.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ dependencies:
github: wyhaines/opentelemetry-sdk.cr
branch: main

protobuf:
github: jeromegn/protobuf.cr
version: 2.3.0

# For core client
placeos-core-client:
github: placeos/core-client
Expand Down
3 changes: 3 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ dependencies:
openai:
github: spider-gazelle/crystal-openai

alys:
git: https://git.sr.ht/~refi64/alys

development_dependencies:
# Linter
ameba:
Expand Down
3 changes: 3 additions & 0 deletions src/app.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require "alys"
Alys.setup_from_env

require "option_parser"
require "http/client"

Expand Down

0 comments on commit 465442f

Please sign in to comment.