Skip to content

Commit 3c19c2e

Browse files
committed
ddprof CGo test
Add documentation to comment on test purpose
1 parent a567289 commit 3c19c2e

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

scenarios/ddprof_go/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ COPY ./scenarios/ddprof_go/ .
88

99
RUN go build main.go
1010

11+
12+
RUN apt-get update && apt-get install -y \
13+
curl \
14+
xz-utils \
15+
jq \
16+
wget \
17+
&& rm -rf /var/lib/apt/lists/*
18+
1119
# Install native profiling
1220
ARG CACHE_DATE=2023-03-01_09:58:27
1321
COPY ./binaries/ /app/binaries/

scenarios/ddprof_go/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Description
2+
3+
The test aims at checking that we are able to load and capture C allocations.
4+
5+
# Shortcomings
6+
7+
- We are not unwinding through the ASM CGo frame.
8+
- The quantity of allocations is hard to predict considering the Go allocator reserves mmap regions.

scenarios/ddprof_go/expected_profile.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"profile-type": "alloc-samples",
4242
"stack-content": [
4343
{
44-
"regular_expression": ";\\[incomplete\\];;runtime\\.asmcgocall\\.abi0;cAllocateMemory",
44+
"regular_expression": ".*runtime\\.asmcgocall\\.abi0;cAllocateMemory",
4545
"percent": 20,
46-
"error_margin": 10,
46+
"error_margin": 40,
4747
"labels": [
4848
{
4949
"key": "process_id",
@@ -56,7 +56,7 @@
5656
{
5757
"regular_expression": ".*;x_cgo_mmap",
5858
"percent": 80,
59-
"error_margin": 10,
59+
"error_margin": 40,
6060
"labels": [
6161
{
6262
"key": "process_id",

0 commit comments

Comments
 (0)