Skip to content

Commit 28bb8d0

Browse files
committed
commented all benchmarks logs
1 parent 7b154ff commit 28bb8d0

File tree

5 files changed

+29
-1888
lines changed

5 files changed

+29
-1888
lines changed

cpp/itemsjs.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ std::tuple<std::string, std::optional<Roaring>, std::optional<Roaring>> itemsjs:
117117
}
118118

119119
elapsed = std::chrono::high_resolution_clock::now() - start;
120-
std::cout << "load filters indexes time: " << elapsed.count() / 1000000<< std::endl;
120+
//std::cout << "load filters indexes time: " << elapsed.count() / 1000000<< std::endl;
121121

122122
start = std::chrono::high_resolution_clock::now();
123123

@@ -153,7 +153,7 @@ std::tuple<std::string, std::optional<Roaring>, std::optional<Roaring>> itemsjs:
153153
}
154154

155155
elapsed = std::chrono::high_resolution_clock::now() - start;
156-
std::cout << "combination time: " << elapsed.count() / 1000000<< std::endl;
156+
//std::cout << "combination time: " << elapsed.count() / 1000000<< std::endl;
157157

158158
// cross combination with query ids
159159
if (query_ids) {
@@ -243,8 +243,8 @@ std::tuple<std::string, std::optional<Roaring>, std::optional<Roaring>> itemsjs:
243243
}
244244

245245
elapsed = std::chrono::high_resolution_clock::now() - start;
246-
std::cout << "cursor facets search time: " << elapsed.count() / 1000000<< std::endl;
247-
std::cout << "facets crossed times: " << i << std::endl;
246+
//std::cout << "cursor facets search time: " << elapsed.count() / 1000000<< std::endl;
247+
//std::cout << "facets crossed times: " << i << std::endl;
248248

249249
// probably not needed because it's auto destroyed after going out of scope
250250
cursor.close();
@@ -739,7 +739,7 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
739739
}
740740

741741
auto elapsed = std::chrono::high_resolution_clock::now() - start;
742-
std::cout << "parse time: " << elapsed.count() / 1000000<< std::endl;
742+
//std::cout << "parse time: " << elapsed.count() / 1000000<< std::endl;
743743

744744

745745
auto wtxn = lmdb::txn::begin(env);
@@ -809,13 +809,13 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
809809
db_put_roaring(dbi, wtxn, "ids", ids);
810810

811811
elapsed = std::chrono::high_resolution_clock::now() - start;
812-
std::cout << "items put time: " << elapsed.count() / 1000000<< std::endl;
812+
//std::cout << "items put time: " << elapsed.count() / 1000000<< std::endl;
813813

814814
start = std::chrono::high_resolution_clock::now();
815815
wtxn.commit();
816816

817817
elapsed = std::chrono::high_resolution_clock::now() - start;
818-
std::cout << "items put commit time: " << elapsed.count() / 1000000<< std::endl;
818+
//std::cout << "items put commit time: " << elapsed.count() / 1000000<< std::endl;
819819

820820
//std::cout << "start indexing facets: " << std::endl;
821821
start = std::chrono::high_resolution_clock::now();
@@ -865,7 +865,7 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
865865
}
866866

867867
elapsed = std::chrono::high_resolution_clock::now() - start;
868-
std::cout << "roaring facets time: " << elapsed.count() / 1000000 << std::endl;
868+
//std::cout << "roaring facets time: " << elapsed.count() / 1000000 << std::endl;
869869

870870

871871
wtxn = lmdb::txn::begin(env);
@@ -896,13 +896,13 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
896896
}
897897

898898
elapsed = std::chrono::high_resolution_clock::now() - start;
899-
std::cout << "facets put time: " << elapsed.count() / 1000000<< std::endl;
899+
//std::cout << "facets put time: " << elapsed.count() / 1000000<< std::endl;
900900

901901
start = std::chrono::high_resolution_clock::now();
902902
wtxn.commit();
903903

904904
elapsed = std::chrono::high_resolution_clock::now() - start;
905-
std::cout << "facets commit time: " << elapsed.count() / 1000000<< std::endl;
905+
//std::cout << "facets commit time: " << elapsed.count() / 1000000<< std::endl;
906906

907907

908908
start = std::chrono::high_resolution_clock::now();
@@ -925,12 +925,12 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
925925
}
926926

927927
elapsed = std::chrono::high_resolution_clock::now() - start;
928-
std::cout << "roaring full text time: " << elapsed.count() / 1000000 << std::endl;
928+
//std::cout << "roaring full text time: " << elapsed.count() / 1000000 << std::endl;
929929

930930
wtxn = lmdb::txn::begin(env);
931931
auto dbi_terms = lmdb::dbi::open(wtxn, "terms", MDB_CREATE);
932932

933-
cout << "start updating " << search_roar.size() << " terms elements" << endl;
933+
//cout << "start updating " << search_roar.size() << " terms elements" << endl;
934934

935935
start = std::chrono::high_resolution_clock::now();
936936
//i = 1;
@@ -962,13 +962,13 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
962962
}
963963

964964
elapsed = std::chrono::high_resolution_clock::now() - start;
965-
std::cout << "search terms put time: " << elapsed.count() / 1000000<< std::endl;
965+
//std::cout << "search terms put time: " << elapsed.count() / 1000000<< std::endl;
966966

967967
start = std::chrono::high_resolution_clock::now();
968968
wtxn.commit();
969969

970970
elapsed = std::chrono::high_resolution_clock::now() - start;
971-
std::cout << "search terms commit time: " << elapsed.count() / 1000000<< std::endl;
971+
//std::cout << "search terms commit time: " << elapsed.count() / 1000000<< std::endl;
972972

973973

974974
// global variable
@@ -978,7 +978,7 @@ std::string itemsjs::index(const char *&index_path, string json_path, const stri
978978
env.close();
979979

980980
auto elapsed_all = std::chrono::high_resolution_clock::now() - start_all;
981-
std::cout << "time index whole block: " << elapsed_all.count() / 1000000<< std::endl;
981+
//std::cout << "time index whole block: " << elapsed_all.count() / 1000000<< std::endl;
982982

983983
return "index";
984984

@@ -1239,7 +1239,7 @@ Napi::String itemsjs::IndexWrapped(const Napi::CallbackInfo& info) {
12391239
append = false;
12401240
}
12411241

1242-
cout << "append " << append << endl;
1242+
//cout << "append " << append << endl;
12431243

12441244
string json_string;
12451245
string json_path;

0 commit comments

Comments
 (0)