mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 23:31:03 +00:00
test stuff
This commit is contained in:
parent
63300db1bd
commit
fd58fe1a7d
2 changed files with 6 additions and 4 deletions
9
api.go
9
api.go
|
|
@ -949,10 +949,10 @@ func (api *API) Usage(ctx context.Context, remote bool) (map[string]NodeUsage, e
|
|||
api.usageCache.muRead.Lock()
|
||||
defer api.usageCache.muRead.Unlock()
|
||||
|
||||
// var t time.Time
|
||||
// if api.usageCache.lastUpdated == t {
|
||||
api.calculateUsage()
|
||||
// }
|
||||
var t time.Time
|
||||
if api.usageCache.lastUpdated == t {
|
||||
api.calculateUsage()
|
||||
}
|
||||
|
||||
if !remote {
|
||||
api.requestUsageOfNodes()
|
||||
|
|
@ -1051,6 +1051,7 @@ func (api *API) RefreshUsageCache(refresh time.Duration) {
|
|||
data: make(map[string]NodeUsage),
|
||||
refreshInterval: refresh,
|
||||
}
|
||||
time.Sleep(time.Second * 5)
|
||||
for {
|
||||
fmt.Println(1)
|
||||
api.calculateUsage()
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ func TestHandler_Endpoints(t *testing.T) {
|
|||
// }
|
||||
|
||||
for _, nodeUsage := range nodeUsages {
|
||||
t.Logf("Len of Indexes: %+v\n", len(nodeUsage.Disk.IndexUsage))
|
||||
numIndexes := len(nodeUsage.Disk.IndexUsage)
|
||||
fmt.Printf("Node Usage: %+v\n", nodeUsage)
|
||||
fmt.Printf("Disk Usage: %+v\n", nodeUsage.Disk)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue