Implement an API for performance monitoring

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2021-10-15 18:05:00 +03:00
committed by Ramkumar Chinchani
parent 061dfb333b
commit 8e4d828867
54 changed files with 27267 additions and 196 deletions
+8 -3
View File
@@ -1,3 +1,5 @@
// +build extended
package common_test
import (
@@ -13,6 +15,7 @@ import (
"github.com/anuvu/zot/pkg/api"
"github.com/anuvu/zot/pkg/api/config"
extconf "github.com/anuvu/zot/pkg/extensions/config"
"github.com/anuvu/zot/pkg/extensions/monitoring"
"github.com/anuvu/zot/pkg/extensions/search/common"
"github.com/anuvu/zot/pkg/log"
"github.com/anuvu/zot/pkg/storage"
@@ -159,7 +162,8 @@ func TestImageFormat(t *testing.T) {
log := log.NewLogger("debug", "")
dbDir := "../../../../test/data"
defaultStore := storage.NewImageStore(dbDir, false, false, log)
metrics := monitoring.NewMetricsServer(false, log)
defaultStore := storage.NewImageStore(dbDir, false, false, log, metrics)
storeController := storage.StoreController{DefaultStore: defaultStore}
olu := common.NewOciLayoutUtils(storeController, log)
@@ -444,9 +448,10 @@ func TestUtilsMethod(t *testing.T) {
}
defer os.RemoveAll(subRootDir)
defaultStore := storage.NewImageStore(rootDir, false, false, log)
metrics := monitoring.NewMetricsServer(false, log)
defaultStore := storage.NewImageStore(rootDir, false, false, log, metrics)
subStore := storage.NewImageStore(subRootDir, false, false, log)
subStore := storage.NewImageStore(subRootDir, false, false, log, metrics)
subStoreMap := make(map[string]storage.ImageStore)