Repository Analysis

apache/brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".

6.8 Low AI signal View on GitHub
6.8
Adjusted Score
6.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
17,509
Stars
C++
Language
288,203
Lines of Code
1192
Files
1960
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 2LOW 1958

Pattern Findings

1960 matches across 10 categories. Click a row to expand file-level details.

Over-Commented Block1919 hits · 1894 pts
SeverityFileLineSnippet
LOWCMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWconfig_brpc.sh1#!/usr/bin/env sh
LOW.licenserc.yaml1# Licensed to the Apache Software Foundation (ASF) under one
LOWCHANGES.md1<!--
LOWtools/print_gcc_version.sh1#!/usr/bin/env bash
LOWtools/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/lldb_bthread_stack.py1#!/usr/bin/env python
LOWtools/get_brpc_revision.sh1#!/usr/bin/env bash
LOWtools/gdb_bthread_stack.py1#!/usr/bin/env python
LOWtools/add_syntax_equal_proto2_to_all.sh1#!/usr/bin/env bash
LOWtools/rpc_replay/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_replay/info_thread.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_replay/info_thread.h1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_replay/rpc_replay.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_replay/rpc_replay.cpp21#include <butil/time.h>
LOWtools/parallel_http/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/parallel_http/parallel_http.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/trackme_server/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/trackme_server/trackme_server.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/pb_util.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/pb_util.h1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/json_loader.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/client.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/rpc_press_impl.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/rpc_press_impl.cpp21#include <sys/time.h>
LOWtools/rpc_press/info_thread.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/rpc_press.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/json_loader.h1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/rpc_press_impl.h1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_press/info_thread.h1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_view/rpc_view.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtools/rpc_view/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_mvariable_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_mvariable_unittest.cpp21#include <string_view>
LOWtest/brpc_http_message_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_channel_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_channel_unittest.cpp21
LOWtest/bthread_setconcurrency_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_multi_dimension_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_multi_dimension_unittest.cpp21#include <cstddef>
LOWtest/bthread_id_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/baidu_thread_local_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_status_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_http_rpc_protocol_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_http_rpc_protocol_unittest.cpp21
LOWtest/brpc_http_rpc_protocol_unittest.cpp41#include "butil/files/scoped_file.h"
LOWtest/bvar_lock_timer_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_load_balancer_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_load_balancer_unittest.cpp21
LOWtest/brpc_load_balancer_unittest.cpp1301 bthread_usleep(500000 /* sleep longer than timeout of channel */);
LOWtest/brpc_load_balancer_unittest.cpp1321// if (latency <= 0) { /* time skews, ignore the sample */ return 0; }
LOWtest/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtest/string_splitter_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_hulu_pbrpc_protocol_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/brpc_hulu_pbrpc_protocol_unittest.cpp21
LOWtest/brpc_snappy_compress_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/bvar_variable_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/object_pool_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
LOWtest/recordio_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under one
1859 more matches not shown…
Example Usage Blocks10 hits · 15 pts
SeverityFileLineSnippet
LOWtest/multiprocess_func_list.h20// Example usage:
LOWsrc/brpc/versioned_ref_with_id.h146// Example usage:
LOWsrc/butil/lazy_instance.h26// Example usage:
LOWsrc/butil/gtest_prod_util.h33// Example usage:
LOWsrc/butil/gtest_prod_util.h63// Example usage:
LOWsrc/butil/compiler_specific.h47// Example usage:
LOWsrc/butil/memory/singleton.h168// Example usage:
LOWsrc/butil/mac/foundation_util.h251// Example usage:
LOWsrc/butil/mac/foundation_util.h312// Example usage:
LOWsrc/butil/threading/thread_local.h32// Example usage:
Slop Phrases9 hits · 14 pts
SeverityFileLineSnippet
LOWexample/dynamic_partition_echo_c++/server.cpp162 // Don't forget to stop and join the server otherwise still-running
LOWexample/selective_echo_c++/server.cpp161 // Don't forget to stop and join the server otherwise still-running
LOWexample/multi_threaded_echo_fns_c++/server.cpp177 // Don't forget to stop and join the server otherwise still-running
LOWexample/partition_echo_c++/server.cpp162 // Don't forget to stop and join the server otherwise still-running
LOWsrc/bthread/task_group.cpp225 // Don't forget to add elapse of last wait_task.
LOWsrc/brpc/parallel_channel.cpp315 // NOTE: Don't forget to set "nfailed = _ndone" when the _cntl is set
LOWsrc/brpc/health_reporter.h35 // Don't forget to call done->Run() at the end.
LOWsrc/brpc/controller.cpp1221 // Don't forget to signal waiters on authentication
LOWsrc/brpc/http_header.cpp34 // NOTE: don't forget to clear the field in Clear() as well.
AI Slop Vocabulary7 hits · 11 pts
SeverityFileLineSnippet
MEDIUMsrc/brpc/span.h192 // However, returning by value is more robust: it prevents potential data races if
LOWsrc/brpc/builtin/pprof_perl.cpp1210 "# names. You show the name the first time, and just use its number\n"
LOWsrc/brpc/builtin/pprof_perl.cpp3642 " # Since we know one of the pair is 0, it's fine to just add them.\n"
LOWsrc/brpc/builtin/pprof_perl.cpp4264 "# If all else fails, just return the name of the library unmodified.\n"
LOWsrc/brpc/builtin/pprof_perl.cpp4753 " # If \"addr2line\" isn't installed on the system at all, just use\n"
LOWsrc/brpc/builtin/pprof_perl.cpp4885 " # No symbols: just use addresses\n"
MEDIUMsrc/butil/safe_strerror_posix.h34// more robust in the case of heap corruption errors, since it doesn't need to
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippet
LOWexample/couchbase_c++/couchbase_client.cpp34 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})";
LOWexample/couchbase_c++/couchbase_client.cpp121 R"({"name": "Jane Doe", "age": 28, "email": "jane.doe@example.com"})";
LOW…le/couchbase_c++/traditional_brpc_couchbase_client.cpp93 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})",
LOWdocs/en/couchbase_example.md328 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})", // value
LOWdocs/en/couchbase_example.md519std::string add_value = R"({"name": "John Doe", "age": 30, "email": "john@example.com"})";
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippet
LOWsrc/bthread/rwlock.cpp235 // Step 1: announce ourselves before doing anything else, so that
LOWsrc/bthread/rwlock.cpp251 // Step 2: serialize with other writers. At most one writer holds
LOWsrc/bthread/rwlock.cpp275 // Step 3: with `writer_queue_mutex' held, wait for all readers to drain
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippet
LOWtools/lldb_bthread_stack.py128
LOWtools/gdb_bthread_stack.py73
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippet
LOWsrc/brpc/builtin/pprof_perl.cpp3753 " # Check if the file contains a symbol-section marker.\n"
LOWsrc/brpc/builtin/pprof_perl.cpp5178 " # Verify if addr2line can find the $sep_symbol. If not, we use objdump\n"
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOWsrc/brpc/builtin/flot_min_js.cpp46 return "(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o
LOWsrc/brpc/builtin/flot_min_js.cpp46 return "(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/gdb_bthread_stack.py173 except Exception as e: