mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-04-04 13:47:36 +03:00
More metrics
This commit is contained in:
parent
754b456320
commit
fe731d43cd
8 changed files with 75 additions and 28 deletions
|
@ -67,6 +67,7 @@ func (c *fileCache) Write(id string, in io.Reader, limiters ...util.Limiter) (in
|
|||
}
|
||||
c.mu.Lock()
|
||||
c.totalSizeCurrent += size
|
||||
metrics.attachmentsTotalSize.Set(float64(c.totalSizeCurrent))
|
||||
c.mu.Unlock()
|
||||
return size, nil
|
||||
}
|
||||
|
@ -89,6 +90,7 @@ func (c *fileCache) Remove(ids ...string) error {
|
|||
c.mu.Lock()
|
||||
c.totalSizeCurrent = size
|
||||
c.mu.Unlock()
|
||||
metrics.attachmentsTotalSize.Set(float64(size))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue