Skip to content

Commit

Permalink
Update instance type information, use Go embed instead of go-bindata
Browse files Browse the repository at this point in the history
- Update instance type information to include C6in, R6in, M6in and TRN1 instance types, as per https://instancetyp.es/
- Use the Go native embed package instead of the unmaintained go-bindata dependency. This seems to dignificantly reduce the memory consumption at runtime from a peak of 142MB to 8.3MB as per the below measurements.
- Increase dependency to Go 1.16, which is needed for the embed package.

Memory consumption on macOS, measured using `/usr/bin/time -l instances` after running go build in the examples/instances directory:

before, commit da3da50
 0.69 real         0.39 user         0.02 sys
           148684800  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
                9202  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                  60  signals received
                 132  voluntary context switches
                2280  involuntary context switches
          5378478347  instructions retired
          1268055640  cycles elapsed
           142886208  peak memory footprint

after, commit 6defc1a6a5b4f9f612a75efb30e3659c12a7145e

 0.37 real         0.34 user         0.01 sys
            73236480  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
                4597  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                  27  signals received
                 143  voluntary context switches
                 217  involuntary context switches
          5151728801  instructions retired
          1139373820  cycles elapsed
             8340544  peak memory footprint
  • Loading branch information
cristim committed Nov 30, 2022
1 parent da3da50 commit 8d1037b
Show file tree
Hide file tree
Showing 5 changed files with 1,585,048 additions and 257 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.idea
instances.json
.history
248 changes: 0 additions & 248 deletions data/generated_bindata.go

This file was deleted.

Loading

0 comments on commit 8d1037b

Please sign in to comment.