Skip to content

Commit

Permalink
pegasus_server: refactor perf counter (apache#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
shengofsun authored Jul 9, 2018
1 parent 8ee7e1d commit ba5f78b
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 526 deletions.
2 changes: 1 addition & 1 deletion rdsn
Submodule rdsn updated 44 files
+1 −1 include/dsn/dist/failure_detector/failure_detector.h
+0 −15 include/dsn/perf_counter/perf_counter.h
+2 −3 include/dsn/perf_counter/perf_counter_wrapper.h
+6 −4 include/dsn/perf_counter/perf_counters.h
+0 −2 include/dsn/tool-api/global_config.h
+1 −1 include/dsn/tool-api/task_queue.h
+1 −1 include/dsn/tool-api/task_spec.h
+1 −1 include/dsn/tool-api/task_worker.h
+0 −2 include/dsn/tool_api.h
+0 −3 src/apps/echo/config.ini
+1 −1 src/apps/nfs/nfs_client_impl.h
+1 −1 src/apps/nfs/nfs_server_impl.h
+1 −0 src/core/CMakeLists.txt
+1 −1 src/core/core/disk_engine.cpp
+1 −1 src/core/core/rpc_engine.cpp
+2 −6 src/core/core/service_engine.cpp
+1 −1 src/core/core/task_engine.cpp
+1 −1 src/core/core/task_engine.h
+1 −1 src/core/core/task_queue.cpp
+1 −1 src/core/core/task_spec.cpp
+0 −7 src/core/core/tool_api.cpp
+19 −0 src/core/perf_counter/CMakeLists.txt
+97 −146 src/core/perf_counter/perf_counter_atomic.h
+26 −8 src/core/perf_counter/perf_counters.cpp
+1 −0 src/core/runtime/CMakeLists.txt
+11 −21 src/core/tests/perf_counter.cpp
+1 −1 src/core/tests/perf_counters.cpp
+0 −3 src/core/tools/common/nativerun.cpp
+1 −1 src/core/tools/common/profiler.cpp
+1 −1 src/core/tools/common/profiler_header.h
+0 −14 src/core/tools/common/providers.common.cpp
+4 −4 src/core/tools/common/shared_io_service.h
+0 −428 src/core/tools/common/simple_perf_counter.cpp
+0 −49 src/core/tools/common/simple_perf_counter.h
+0 −50 src/core/tools/common/simple_perf_counter_v2_atomic.h
+0 −499 src/core/tools/common/simple_perf_counter_v2_fast.cpp
+0 −50 src/core/tools/common/simple_perf_counter_v2_fast.h
+0 −3 src/core/tools/simulator/simulator.cpp
+1 −1 src/dist/replication/client_lib/fs_manager.h
+1 −1 src/dist/replication/lib/replica.h
+1 −1 src/dist/replication/lib/replica_stub.h
+1 −1 src/dist/replication/meta_server/meta_backup_service.h
+1 −1 src/dist/replication/meta_server/meta_service.h
+1 −1 src/dist/replication/meta_server/server_state.h
2 changes: 1 addition & 1 deletion src/server/available_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <pegasus/client.h>
#include <dsn/dist/replication/replication_ddl_client.h>
#include <dsn/cpp/perf_counter_wrapper.h>
#include <dsn/perf_counter/perf_counter_wrapper.h>

namespace pegasus {
namespace server {
Expand Down
1 change: 0 additions & 1 deletion src/server/config-server.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ toollets = profiler
pause_on_start = false
cli_local = true
cli_remote = true
perf_counter_factory_name = pegasus::server::pegasus_perf_counter
;aio_factory_name = dsn::tools::native_aio_provider
start_nfs = true

Expand Down
4 changes: 0 additions & 4 deletions src/server/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
enable_default_app_mimic = true
start_nfs = true

timer_io_mode = IOE_PER_QUEUE

perf_counter_factory_name = pegasus::server::pegasus_perf_counter

logging_start_level = LOG_LEVEL_DEBUG
logging_factory_name = dsn::tools::simple_logger
logging_flush_on_exit = true
Expand Down
2 changes: 1 addition & 1 deletion src/server/info_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <dsn/tool-api/task_tracker.h>
#include <dsn/dist/replication.h>
#include <dsn/dist/replication/replication_other_types.h>
#include <dsn/cpp/perf_counter_wrapper.h>
#include <dsn/perf_counter/perf_counter_wrapper.h>

#include <stdlib.h>
#include <signal.h>
Expand Down
6 changes: 0 additions & 6 deletions src/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "pegasus_server_impl.h"
#include "pegasus_service_app.h"
#include "info_collector_app.h"
#include "pegasus_perf_counter.h"
#include "pegasus_counter_updater.h"

#include <pegasus/version.h>
Expand Down Expand Up @@ -43,11 +42,6 @@ void dsn_app_registration_pegasus()

pegasus::server::pegasus_server_impl::register_service();

::dsn::tools::internal_use_only::register_component_provider(
"pegasus::server::pegasus_perf_counter",
pegasus::server::pegasus_perf_counter_factory,
::dsn::PROVIDER_TYPE_MAIN);

::dsn::command_manager::instance().register_command(
{"server-info"},
"server-info - query server information",
Expand Down
4 changes: 2 additions & 2 deletions src/server/pegasus_counter_updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <dsn/utility/synchronize.h>
#include <dsn/c/api_utilities.h>
#include <dsn/cpp/json_helper.h>
#include <dsn/cpp/perf_counter_wrapper.h>
#include <dsn/tool-api/perf_counter.h>
#include <dsn/perf_counter/perf_counter_wrapper.h>
#include <dsn/perf_counter/perf_counter.h>

#include <boost/asio.hpp>
#include <event2/event.h>
Expand Down
2 changes: 1 addition & 1 deletion src/server/pegasus_event_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <rocksdb/db.h>
#include <rocksdb/listener.h>
#include <dsn/cpp/perf_counter_wrapper.h>
#include <dsn/perf_counter/perf_counter_wrapper.h>

namespace pegasus {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/server/pegasus_manual_compact_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <rocksdb/db.h>
#include <dsn/utility/string_view.h>
#include <dsn/cpp/perf_counter_wrapper.h>
#include <dsn/perf_counter/perf_counter_wrapper.h>
#include <dsn/dist/replication/replica_base.h>

namespace pegasus {
Expand Down
Loading

0 comments on commit ba5f78b

Please sign in to comment.