Skip to content
Closed
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
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -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?
Binary file added labs/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/lab12/containerd-shim-wasmtime-v1
Binary file not shown.
Binary file added labs/lab12/main.wasm
Binary file not shown.
Binary file added labs/lab12/moscow-time-traditional
Binary file not shown.
62 changes: 62 additions & 0 deletions labs/submission12.md
Original file line number Diff line number Diff line change
@@ -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)