Skip to content

Commit c26b842

Browse files
committed
Fix tracing clang-format
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
1 parent 937b99b commit c26b842

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

src/common/comp/brute_force.cc

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ BruteForceSearchWithBufImpl(const DataSetPtr base_dataset, const DataSetPtr quer
509509

510510
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
511511
// LCOV_EXCL_START
512-
auto span = milvus::tracer::ScopedSpan("knowhere bf search with buf",
513-
milvus::OpContext::GetTraceSpan(op_context));
512+
auto span = milvus::tracer::ScopedSpan("knowhere bf search with buf", milvus::OpContext::GetTraceSpan(op_context));
514513
const auto& span_ptr = span.Get();
515514
if (span_ptr != nullptr) {
516515
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -662,7 +661,7 @@ BruteForceSearchOnChunkWithBufImpl(const DataSetPtr base_dataset, const DataSetP
662661
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
663662
// LCOV_EXCL_START
664663
auto span = milvus::tracer::ScopedSpan("knowhere bf search [on chunk] with buf",
665-
milvus::OpContext::GetTraceSpan(op_context));
664+
milvus::OpContext::GetTraceSpan(op_context));
666665
const auto& span_ptr = span.Get();
667666
if (span_ptr != nullptr) {
668667
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -935,8 +934,7 @@ BruteForceRangeSearchImpl(const DataSetPtr base_dataset, const DataSetPtr query_
935934

936935
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
937936
// LCOV_EXCL_START
938-
auto span = milvus::tracer::ScopedSpan("knowhere bf range search",
939-
milvus::OpContext::GetTraceSpan(op_context));
937+
auto span = milvus::tracer::ScopedSpan("knowhere bf range search", milvus::OpContext::GetTraceSpan(op_context));
940938
const auto& span_ptr = span.Get();
941939
if (span_ptr != nullptr) {
942940
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -1143,8 +1141,8 @@ BruteForceSearchSparseWithBufImpl(const DataSetPtr base_dataset, const DataSetPt
11431141
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
11441142
// LCOV_EXCL_START
11451143
auto dim = base_dataset->GetDim();
1146-
auto span = milvus::tracer::ScopedSpan("knowhere bf search sparse with buf",
1147-
milvus::OpContext::GetTraceSpan(op_context));
1144+
auto span =
1145+
milvus::tracer::ScopedSpan("knowhere bf search sparse with buf", milvus::OpContext::GetTraceSpan(op_context));
11481146
const auto& span_ptr = span.Get();
11491147
if (span_ptr != nullptr) {
11501148
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -1268,7 +1266,7 @@ BruteForceAnnIteratorImpl(const DataSetPtr base_dataset, const DataSetPtr query_
12681266
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
12691267
// LCOV_EXCL_START
12701268
auto span = milvus::tracer::ScopedSpan("knowhere bf ann iterator initialization",
1271-
milvus::OpContext::GetTraceSpan(op_context));
1269+
milvus::OpContext::GetTraceSpan(op_context));
12721270
const auto& span_ptr = span.Get();
12731271
if (span_ptr != nullptr) {
12741272
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -1490,7 +1488,7 @@ BruteForceAnnIteratorOnChunkImpl(const DataSetPtr base_dataset, const DataSetPtr
14901488
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
14911489
// LCOV_EXCL_START
14921490
auto span = milvus::tracer::ScopedSpan("knowhere bf ann iterator initialization",
1493-
milvus::OpContext::GetTraceSpan(op_context));
1491+
milvus::OpContext::GetTraceSpan(op_context));
14941492
const auto& span_ptr = span.Get();
14951493
if (span_ptr != nullptr) {
14961494
span_ptr->SetAttribute(meta::METRIC_TYPE, cfg.metric_type.value());
@@ -1694,8 +1692,7 @@ BruteForceAnnIteratorImpl<knowhere::sparse::SparseRow<float>>(const DataSetPtr b
16941692
#if defined(NOT_COMPILE_FOR_SWIG) && !defined(KNOWHERE_WITH_LIGHT)
16951693
// LCOV_EXCL_START
16961694
auto dim = base_dataset->GetDim();
1697-
auto span = milvus::tracer::ScopedSpan("knowhere bf iterator sparse",
1698-
milvus::OpContext::GetTraceSpan(op_context));
1695+
auto span = milvus::tracer::ScopedSpan("knowhere bf iterator sparse", milvus::OpContext::GetTraceSpan(op_context));
16991696
const auto& span_ptr = span.Get();
17001697
if (span_ptr != nullptr) {
17011698
span_ptr->SetAttribute(meta::METRIC_TYPE, metric_str);

src/index/index.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ Index<T>::Search(const DataSetPtr dataset, const Json& json, const BitsetView& b
171171
span_ptr->SetAttribute(meta::DIM, Dim());
172172
span_ptr->SetAttribute(meta::NQ, dataset->GetRows());
173173
}
174-
auto op_context_trace_span_guard = milvus::tracer::NestedSpanGuard(op_context ? &op_context->trace_span : nullptr, span_ptr);
174+
auto op_context_trace_span_guard =
175+
milvus::tracer::NestedSpanGuard(op_context ? &op_context->trace_span : nullptr, span_ptr);
175176
// LCOV_EXCL_STOP
176177

177178
TimeRecorder rc("Search");
@@ -267,7 +268,8 @@ Index<T>::RangeSearch(const DataSetPtr dataset, const Json& json, const BitsetVi
267268
span_ptr->SetAttribute(meta::DIM, Dim());
268269
span_ptr->SetAttribute(meta::NQ, dataset->GetRows());
269270
}
270-
auto op_context_trace_span_guard = milvus::tracer::NestedSpanGuard(op_context ? &op_context->trace_span : nullptr, span_ptr);
271+
auto op_context_trace_span_guard =
272+
milvus::tracer::NestedSpanGuard(op_context ? &op_context->trace_span : nullptr, span_ptr);
271273
// LCOV_EXCL_STOP
272274

273275
TimeRecorder rc("Range Search");

0 commit comments

Comments
 (0)