MCPcopy Create free account
hub / github.com/alibaba/zvec / SparseBench

Method SparseBench

tools/core/bench_original.cc:378–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376class SparseBench {
377 public:
378 SparseBench(size_t threads, size_t bench_secs, size_t batch_count,
379 FilterMode filter_mode)
380 : threads_(threads),
381 bench_secs_(bench_secs),
382 batch_count_(batch_count),
383 filter_mode_{filter_mode} {
384 if (threads_ == 0) {
385 pool_ = make_shared<ThreadPool>();
386 threads_ = pool_->count();
387 cout << "Using cpu count as thread pool count[" << threads_ << "]"
388 << endl;
389 } else {
390 pool_ = make_shared<ThreadPool>(threads_, false);
391 threads_ = pool_->count();
392 cout << "Using thread pool count[" << threads_ << "]" << endl;
393 }
394 if (batch_count_ < 1) {
395 batch_count_ = 1;
396 }
397 }
398
399 static void stop(int signo) {
400 if (stop_now) {

Callers

nothing calls this directly

Calls 1

countMethod · 0.45

Tested by

no test coverage detected