shows total memory usage

This commit is contained in:
Marcos Diez
2019-07-05 19:07:13 -04:00
committed by Bradley Cicenas
parent d8c7dd4c5c
commit 1271ce96e8
3 changed files with 19 additions and 1 deletions
+10
View File
@@ -17,6 +17,16 @@ type GridCursor struct {
func (gc *GridCursor) Len() int { return len(gc.filtered) }
func (gc *GridCursor) MemoryUsage() int64 {
var size int64
size = 0
for _, c := range gc.filtered {
size += c.MemUsage
}
gc.Reset()
return size
}
func (gc *GridCursor) Selected() *container.Container {
idx := gc.Idx()
if idx < gc.Len() {