Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions security/lab12/cold-start.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"spin": [
{
"run": 1,
"ms": 646.4,
"attempts": 1,
"body": "{\"unix\":1783593682,\"iso\":\"2026-07-09T13:41:22+03:00\",\"hour_minute\":\"13:41\",\"timezone\":\"Europe/Moscow (UTC+3)\"}"
},
{
"run": 2,
"ms": 522.8,
"attempts": 1,
"body": "{\"unix\":1783593683,\"iso\":\"2026-07-09T13:41:23+03:00\",\"hour_minute\":\"13:41\",\"timezone\":\"Europe/Moscow (UTC+3)\"}"
},
{
"run": 3,
"ms": 520.5,
"attempts": 1,
"body": "{\"unix\":1783593684,\"iso\":\"2026-07-09T13:41:24+03:00\",\"hour_minute\":\"13:41\",\"timezone\":\"Europe/Moscow (UTC+3)\"}"
},
{
"run": 4,
"ms": 522.5,
"attempts": 1,
"body": "{\"unix\":1783593685,\"iso\":\"2026-07-09T13:41:25+03:00\",\"hour_minute\":\"13:41\",\"timezone\":\"Europe/Moscow (UTC+3)\"}"
},
{
"run": 5,
"ms": 521.9,
"attempts": 1,
"body": "{\"unix\":1783593686,\"iso\":\"2026-07-09T13:41:26+03:00\",\"hour_minute\":\"13:41\",\"timezone\":\"Europe/Moscow (UTC+3)\"}"
}
],
"docker": [
{
"run": 1,
"ms": 520.7,
"attempts": 1,
"body": "{\"notes\":4,\"status\":\"ok\"}"
},
{
"run": 2,
"ms": 507,
"attempts": 1,
"body": "{\"notes\":4,\"status\":\"ok\"}"
},
{
"run": 3,
"ms": 550.1,
"attempts": 1,
"body": "{\"notes\":4,\"status\":\"ok\"}"
},
{
"run": 4,
"ms": 479.1,
"attempts": 1,
"body": "{\"notes\":4,\"status\":\"ok\"}"
},
{
"run": 5,
"ms": 515.4,
"attempts": 1,
"body": "{\"notes\":4,\"status\":\"ok\"}"
}
]
}
170 changes: 170 additions & 0 deletions security/lab12/docker-hyperfine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
"results": [
{
"command": "curl.exe -s -o NUL http://127.0.0.1:18082/health",
"mean": 0.023982005999999997,
"stddev": 0.0023385969218620932,
"median": 0.023237651999999994,
"user": 0.008349999999999998,
"system": 0.0072437500000000045,
"min": 0.020925451999999997,
"max": 0.03145585199999999,
"times": [
0.023697451999999994,
0.022800751999999994,
0.024393151999999994,
0.026698351999999995,
0.024728151999999996,
0.029013251999999996,
0.026318151999999997,
0.025662951999999996,
0.023708151999999996,
0.026702151999999993,
0.026135451999999997,
0.028075551999999997,
0.025629951999999998,
0.026850251999999998,
0.03145585199999999,
0.026349751999999997,
0.025734551999999994,
0.023134751999999995,
0.022737551999999994,
0.022379751999999996,
0.021994851999999995,
0.022146151999999995,
0.022820351999999995,
0.023014251999999992,
0.022273551999999995,
0.022181051999999993,
0.024210651999999992,
0.023579251999999995,
0.029711751999999994,
0.024455051999999998,
0.024906151999999994,
0.024868551999999995,
0.024106051999999996,
0.023355251999999993,
0.022938451999999998,
0.022631351999999993,
0.021631051999999998,
0.021626351999999995,
0.022025151999999992,
0.023161451999999992,
0.022371551999999996,
0.022317751999999996,
0.021761751999999995,
0.023313851999999996,
0.021994451999999998,
0.021877051999999994,
0.021564952,
0.021743851999999994,
0.021386951999999994,
0.020925451999999997
],
"memory_usage_byte": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"exit_codes": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
]
}
22 changes: 22 additions & 0 deletions security/lab12/lab6-baseline.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:1.24-alpine AS builder

WORKDIR /src
COPY go.mod ./
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o /out/quicknotes .
RUN mkdir -p /out/data && chmod 0777 /out/data

FROM scratch

COPY --from=builder /out/quicknotes /quicknotes
COPY --chmod=0777 --from=builder /out/data /data
COPY seed.json /seed.json
COPY --chown=65532:65532 seed.json /data/notes.json

USER 65532:65532
EXPOSE 8080
ENV ADDR=:8080
ENV DATA_PATH=/data/notes.json
ENV SEED_PATH=/seed.json
ENTRYPOINT ["/quicknotes"]
Loading