Sergey Ponomarev
b65e970a83
Improve docker events handling
...
Firstly check health updates because it will be a lot of them especially when a container is unstable.
Clearly handle create event to create a container even if it wasn't started.
Instead of die event handle more precise events like oom, kill and only then trigger refresh.
Lookup the state from a map.
2020-11-17 21:50:25 +02:00
Sergey Ponomarev
957cabba2d
docker.go: watchEvents() optimize actionName extraction
...
Split(e.Action, ":") creates and array but we can avoid this.
2020-11-17 12:06:34 +02:00
Sergey Ponomarev
5aacdc3772
docker.go: logging of events
...
Add log.IsEnabledFor(logging.DEBUG) guard to avoid unnecessary memory allocations. Debug level is usually disabled.
Inline "destroy"
2020-11-17 11:42:45 +02:00
Sergey Ponomarev
3a29c94833
Use percent() function to calc CPU usage
2020-11-13 11:02:14 +02:00
Sergey Ponomarev
a22d99fefb
file.go: remove duplicated trim
...
The s var was already trimmed on line 67
2020-11-12 21:23:18 +02:00
Sergey Ponomarev
2bcfc365f7
Single Container View: truncate ID
...
Truncation Id inside of NewSingle() doesn't work.
It even doesn't have any effect.
Instead truncate the ID inside of NewMeta() call
2020-11-03 14:11:58 +02:00
Sergey Ponomarev
41c04fefa2
text.go: to do not manually truncate id and name columns
...
This truncation is already handled by termui
2020-10-26 15:43:55 +02:00