mirror of https://github.com/milvus-io/milvus.git
test(db): refactor with meta consts
Former-commit-id: a611af0886bdeb51b4a38da2e80b84a4fd13d0ccpull/191/head
parent
b96459cc8b
commit
e09240e45f
|
@ -10,6 +10,7 @@
|
|||
#include "utils.h"
|
||||
#include "db/DB.h"
|
||||
#include "db/DBImpl.h"
|
||||
#include "db/MetaConsts.h"
|
||||
|
||||
using namespace zilliz::vecwise;
|
||||
|
||||
|
@ -98,7 +99,7 @@ TEST_F(DBTest2, ARHIVE_DISK_CHECK) {
|
|||
|
||||
db_->size(size);
|
||||
/* LOG(DEBUG) << "size=" << size; */
|
||||
ASSERT_TRUE(size < 2UL*1024*1024*1024);
|
||||
ASSERT_TRUE(size < 2 * engine::meta::G);
|
||||
|
||||
delete [] xb;
|
||||
};
|
||||
|
@ -155,7 +156,7 @@ TEST_F(DBTest, DB_TEST) {
|
|||
|
||||
START_TIMER;
|
||||
stat = db_->search(group_name, k, qb, qxb, results);
|
||||
ss << "Search " << j << " With Size " << (float)(count*group_dim*sizeof(float))/(1024*1024) << " M";
|
||||
ss << "Search " << j << " With Size " << (float)(count*group_dim*sizeof(float))/engine::meta::M << " M";
|
||||
STOP_TIMER(ss.str());
|
||||
|
||||
ASSERT_STATS(stat);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "db/DBMetaImpl.h"
|
||||
#include "db/Factories.h"
|
||||
#include "db/Utils.h"
|
||||
#include "db/MetaConsts.h"
|
||||
|
||||
using namespace zilliz::vecwise::engine;
|
||||
|
||||
|
@ -116,7 +117,7 @@ TEST_F(MetaTest, ARCHIVE_TEST_DAYS) {
|
|||
status = impl.add_group_file(group_file);
|
||||
group_file.file_type = meta::GroupFileSchema::NEW;
|
||||
int day = rand() % (days_num*2);
|
||||
group_file.created_on = ts - day*24*3600*1000000UL - 10000;
|
||||
group_file.created_on = ts - day*meta::D_SEC*meta::US_PS - 10000;
|
||||
status = impl.update_group_file(group_file);
|
||||
files.push_back(group_file);
|
||||
days.push_back(day);
|
||||
|
@ -160,7 +161,7 @@ TEST_F(MetaTest, ARCHIVE_TEST_DISK) {
|
|||
for (auto i=0; i<cnt; ++i) {
|
||||
status = impl.add_group_file(group_file);
|
||||
group_file.file_type = meta::GroupFileSchema::NEW;
|
||||
group_file.rows = 1024*1024*1024*each_size;
|
||||
group_file.rows = each_size * meta::G;
|
||||
status = impl.update_group_file(group_file);
|
||||
files.push_back(group_file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue