Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat: add table level latency perf counters #336

Merged
merged 7 commits into from
Nov 14, 2019

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Nov 4, 2019

Add table level latency perf-counters for all of the table read or write operations.
1.Count all the storage request rpc codes into std::vector<dsn::task_code> storage_rpc_req_codes from function register_storage_task_code, which would be called by creating storage rpc code.
2.when a replica is created, using the replica's table name, a list of perf counters will be created for each task code in storage_rpc_req_codes. If a perf counter was already created, it would not created repeatly.
3.For read operations, the running time of _app->on_request(request) is Statisticed in function replica::on_client_read.
4.For write operations, a variable was added in mutation_update, which name is start_time_ns. So in execute_mutation function, the running time of the write operaiton will be statisticed by dsn_now_ns() - update.start_time_ns.

Related issue: apache/incubator-pegasus#406

@levy5307 levy5307 changed the title feat: table level latency feat: add table level latency perf counters Nov 4, 2019
include/dsn/dist/replication/replication_types.h Outdated Show resolved Hide resolved
src/dist/replication/lib/replica.cpp Outdated Show resolved Hide resolved
src/dist/replication/lib/replica.cpp Outdated Show resolved Hide resolved
acelyc111
acelyc111 previously approved these changes Nov 6, 2019
hycdong
hycdong previously approved these changes Nov 6, 2019
@levy5307 levy5307 dismissed stale reviews from hycdong and acelyc111 via e80eac5 November 11, 2019 03:00
acelyc111
acelyc111 previously approved these changes Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants