mirror of https://github.com/milvus-io/milvus.git
func coverage
Former-commit-id: 49125a4155b41edbeed0f87776cefe7204673602pull/191/head
parent
9f82b5e351
commit
9f4f41b3e7
|
@ -1,6 +1,6 @@
|
|||
* GLOBAL:
|
||||
FORMAT = "%datetime | %level | %logger | %msg"
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-global.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-global.log"
|
||||
ENABLED = true
|
||||
TO_FILE = true
|
||||
TO_STANDARD_OUTPUT = false
|
||||
|
@ -8,12 +8,12 @@
|
|||
PERFORMANCE_TRACKING = false
|
||||
MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB
|
||||
* DEBUG:
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-debug.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-debug.log"
|
||||
ENABLED = true
|
||||
* WARNING:
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-warning.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-warning.log"
|
||||
* TRACE:
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-trace.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-trace.log"
|
||||
* VERBOSE:
|
||||
FORMAT = "%datetime{%d/%M/%y} | %level-%vlevel | %msg"
|
||||
TO_FILE = false
|
||||
|
@ -21,7 +21,7 @@
|
|||
## Error logs
|
||||
* ERROR:
|
||||
ENABLED = true
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-error.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-error.log"
|
||||
* FATAL:
|
||||
ENABLED = true
|
||||
FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-fatal.log"
|
||||
FILENAME = "/opt/milvus/logs/milvus-%datetime{%H:%m}-fatal.log"
|
||||
|
|
|
@ -5,7 +5,7 @@ server_config:
|
|||
mode: single # milvus deployment type: single, cluster
|
||||
|
||||
db_config:
|
||||
db_path: /tmp/milvus # milvus data storage path
|
||||
db_path: /opt/milvus # milvus data storage path
|
||||
db_backend_url: http://127.0.0.1 # meta database uri
|
||||
index_building_threshold: 1024 # index building trigger threshold, default: 1024, unit: MB
|
||||
archive_disk_threshold: 512 # triger archive action if storage size exceed this value, unit: GB
|
||||
|
@ -22,7 +22,7 @@ metric_config:
|
|||
|
||||
|
||||
license_config: # license configure
|
||||
license_path: "/tmp/milvus/system.license" # license file path
|
||||
license_path: "/opt/milvus/system.license" # license file path
|
||||
|
||||
cache_config: # cache configure
|
||||
cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory
|
||||
|
|
|
@ -57,7 +57,7 @@ set(count_test_src
|
|||
metrics_test.cpp
|
||||
prometheus_test.cpp
|
||||
../db/utils.cpp
|
||||
)
|
||||
metricbase_test.cpp)
|
||||
|
||||
|
||||
add_executable(metrics_test ${count_test_src} ${require_files} )
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
||||
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
||||
* Proprietary and confidential.
|
||||
******************************************************************************/
|
||||
|
||||
#include "metrics/Metrics.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace zilliz::milvus;
|
||||
|
||||
TEST(MetricbaseTest, Metricbase_Test){
|
||||
server::MetricsBase instance = server::MetricsBase::GetInstance();
|
||||
instance.Init();
|
||||
server::SystemInfo::GetInstance().Init();
|
||||
instance.AddVectorsSuccessTotalIncrement();
|
||||
instance.AddVectorsFailTotalIncrement();
|
||||
instance.AddVectorsDurationHistogramOberve(1.0);
|
||||
instance.RawFileSizeHistogramObserve(1.0);
|
||||
instance.IndexFileSizeHistogramObserve(1.0);
|
||||
instance.BuildIndexDurationSecondsHistogramObserve(1.0);
|
||||
instance.CacheUsageGaugeSet(1.0);
|
||||
instance.MetaAccessTotalIncrement();
|
||||
instance.MetaAccessDurationSecondsHistogramObserve(1.0);
|
||||
instance.FaissDiskLoadDurationSecondsHistogramObserve(1.0);
|
||||
instance.FaissDiskLoadSizeBytesHistogramObserve(1.0);
|
||||
instance.FaissDiskLoadIOSpeedGaugeSet(1.0);
|
||||
instance.CacheAccessTotalIncrement();
|
||||
instance.MemTableMergeDurationSecondsHistogramObserve(1.0);
|
||||
instance.SearchIndexDataDurationSecondsHistogramObserve(1.0);
|
||||
instance.SearchRawDataDurationSecondsHistogramObserve(1.0);
|
||||
instance.IndexFileSizeTotalIncrement();
|
||||
instance.RawFileSizeTotalIncrement();
|
||||
instance.IndexFileSizeGaugeSet(1.0);
|
||||
instance.RawFileSizeGaugeSet(1.0);
|
||||
instance.QueryResponseSummaryObserve(1.0);
|
||||
instance.DiskStoreIOSpeedGaugeSet(1.0);
|
||||
instance.DataFileSizeGaugeSet(1.0);
|
||||
instance.AddVectorsSuccessGaugeSet(1.0);
|
||||
instance.AddVectorsFailGaugeSet(1.0);
|
||||
instance.QueryVectorResponseSummaryObserve(1.0, 1);
|
||||
instance.QueryVectorResponsePerSecondGaugeSet(1.0);
|
||||
instance.CPUUsagePercentSet();
|
||||
instance.RAMUsagePercentSet();
|
||||
instance.QueryResponsePerSecondGaugeSet(1.0);
|
||||
instance.GPUPercentGaugeSet();
|
||||
instance.GPUMemoryUsageGaugeSet();
|
||||
instance.AddVectorsPerSecondGaugeSet(1,1,1);
|
||||
instance.QueryIndexTypePerSecondSet("IVF", 1.0);
|
||||
instance.ConnectionGaugeIncrement();
|
||||
instance.ConnectionGaugeDecrement();
|
||||
instance.KeepingAliveCounterIncrement();
|
||||
instance.OctetsSet();
|
||||
}
|
Loading…
Reference in New Issue