Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Software Heritage virtual environment packaging manifests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
Software Heritage virtual environment packaging manifests
Commits
752128a1
Commit
752128a1
authored
1 year ago
by
Nicolas Dandrimont
Browse files
Options
Downloads
Patches
Plain Diff
Add memray to the swh-counters container
Ref.
sysadm-environment#5259
parent
6abbcd5d
No related branches found
No related tags found
1 merge request
!37
Add memray to the swh-counters container
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/swh-counters/Dockerfile
+2
-0
2 additions, 0 deletions
apps/swh-counters/Dockerfile
apps/swh-counters/entrypoint.sh
+15
-2
15 additions, 2 deletions
apps/swh-counters/entrypoint.sh
apps/swh-counters/requirements.txt
+1
-0
1 addition, 0 deletions
apps/swh-counters/requirements.txt
with
18 additions
and
2 deletions
apps/swh-counters/Dockerfile
+
2
−
0
View file @
752128a1
...
...
@@ -16,6 +16,8 @@ COPY --chown=swh:swh requirements-frozen.txt /opt/swh
ENV
PYTHONPATH=/opt/swh
ENV
PATH=/opt/swh/.local/bin:$PATH
ENV
MEMRAY_ENABLED=false
ENV
MEMRAY_OPTIONS=
RUN
/usr/local/bin/python
-m
pip
install
--upgrade
pip
&&
\
pip
install
--no-cache-dir
-r
requirements-frozen.txt
&&
\
...
...
This diff is collapsed.
Click to expand it.
apps/swh-counters/entrypoint.sh
+
15
−
2
View file @
752128a1
...
...
@@ -13,8 +13,21 @@ case "$1" in
;;
"swh"
)
shift
echo
"Running swh command
$@
"
exec
swh
$@
declare
-a
cmd
if
[
"
${
MEMRAY_ENABLED
}
"
=
"true"
]
;
then
# we expect MEMRAY_OPTIONS to contain quoted values
# shellcheck disable=SC2206
cmd
=(
memray run
--native
${
MEMRAY_OPTIONS
}
)
if
[
-n
"
${
MEMRAY_LIVE_REMOTE_PORT
}
"
]
;
then
cmd+
=(
--live-remote
--live-port
=
"
${
MEMRAY_LIVE_REMOTE_PORT
}
"
)
fi
fi
cmd+
=(
swh
"
$@
"
)
set
-x
exec
"
${
cmd
[@]
}
"
;;
*
)
echo
Starting the swh-search API server
...
...
This diff is collapsed.
Click to expand it.
apps/swh-counters/requirements.txt
+
1
−
0
View file @
752128a1
memray
swh.counters
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment