diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..7819fa9 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +# Goal +Describe the goal of the PR + +# Changes +Describe the changes made to the codebase + +# Testing +Describe the actions made to test the changes + +# Checklist +- [ ] Clear title? +- [ ] docs/README updated if needed? +- [ ] No secrets/large temp files? \ No newline at end of file diff --git a/labs/image-1.png b/labs/image-1.png new file mode 100644 index 0000000..341ad2b Binary files /dev/null and b/labs/image-1.png differ diff --git a/labs/image-2.png b/labs/image-2.png new file mode 100644 index 0000000..9036ced Binary files /dev/null and b/labs/image-2.png differ diff --git a/labs/image.png b/labs/image.png new file mode 100644 index 0000000..cd577f9 Binary files /dev/null and b/labs/image.png differ diff --git a/labs/lab12/containerd-shim-wasmtime-v1 b/labs/lab12/containerd-shim-wasmtime-v1 new file mode 100755 index 0000000..d7f3913 Binary files /dev/null and b/labs/lab12/containerd-shim-wasmtime-v1 differ diff --git a/labs/lab12/main.wasm b/labs/lab12/main.wasm new file mode 100755 index 0000000..50b4159 Binary files /dev/null and b/labs/lab12/main.wasm differ diff --git a/labs/lab12/moscow-time-traditional b/labs/lab12/moscow-time-traditional new file mode 100755 index 0000000..613de7b Binary files /dev/null and b/labs/lab12/moscow-time-traditional differ diff --git a/labs/submission12.md b/labs/submission12.md new file mode 100644 index 0000000..9604701 --- /dev/null +++ b/labs/submission12.md @@ -0,0 +1,62 @@ +**NOTE TO CHECKING STAFF** +I did not manage to finish task 3 on time (therefore disallowing myself from doing task 4) + +## Task 1 + +CLI: +![alt text](image.png) + +Browser: +![alt text](image-1.png) + +The main.go utilizes environmental variables to deduce the preferred mode, falling back to HTTP mode. + +## Task 2 + +### Sizes +```sh +[RatPC|rightrat lab12] sudo docker create --name temp-traditional moscow-time-traditional +d158df4598235c7322fed9f6ddf0e4ea546df25c192d46e38bd69922d4cb78cf +[RatPC|rightrat lab12] sudo docker cp temp-traditional:/app/moscow-time ./moscow-time-traditional +Successfully copied 4.7MB to /home/rightrat/ratsonal/F25-DevOps-Intro/labs/lab12/moscow-time-traditional +[RatPC|rightrat lab12] sudo docker rm temp-traditional +temp-traditional +[RatPC|rightrat lab12] ls -lh moscow-time-traditional +-rwxr-xr-x 1 root root 4,5M дек 10 23:21 moscow-time-traditional +``` +So, 4.5MB + + +```sh +[RatPC|rightrat lab12] sudo docker images moscow-time-traditional + i Info → U In Use +IMAGE ID DISK USAGE CONTENT SIZE EXTRA +moscow-time-traditional:latest 64b4d21e4c51 6.82MB 2.07MB +``` +...or not + +```sh +[RatPC|rightrat lab12] sudo docker image inspect moscow-time-traditional --format '{{.Size}}' | awk '{print $1/1024/1024 " MB"}' +1.97643 MB +``` + +### Startup times + +```sh +[RatPC|rightrat lab12] for i in {1..5}; do /usr/bin/time -f "%e" sudo docker run --rm -e MODE=once moscow-time-traditional 2>&1 | tail -n 1; done | awk '{sum+=$1; count++} END {print "Average:", sum/count, "seconds"}' +Average: 0.158 seconds +``` + +### Memory usage + +```sh +[RatPC|rightrat ~] sudo docker stats test-traditional --no-stream +CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS +ace2c0e22f70 test-traditional 0.01% 3.086MiB / 31.21GiB 0.01% 18.3kB / 6.04kB 0B / 0B 5 +``` + +### Browser run + +![alt text](image-2.png) + +