Skip to content

Commit

Permalink
debug: Allow running scylla_row_cache_report.stp script against a run…
Browse files Browse the repository at this point in the history
…ning process

Message-Id: <1504776359-16424-1-git-send-email-tgrabiec@scylladb.com>
  • Loading branch information
tgrabiec authored and avikivity committed Sep 11, 2017
1 parent fe019ad commit 95b3eaa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions debug/scylla_row_cache_report.stp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/stap

# usage: stap scylla_row_cache_report.stp <scylla binary>
# usage: stap -c <cmd> scylla_row_cache_report.stp
# or: stap -x <pid> scylla_row_cache_report.stp
#
global batch_start_time
global batch_latencies;
Expand All @@ -10,11 +11,11 @@ global start_time
global latencies;


probe process(@1).mark("row_cache_update_one_batch_start") {
probe process.mark("row_cache_update_one_batch_start") {
batch_start_time[tid()] = gettimeofday_ns()
}

probe process(@1).mark("row_cache_update_one_batch_end") {
probe process.mark("row_cache_update_one_batch_end") {
if (batch_start_time[tid()]) {
lat = (gettimeofday_ns() - batch_start_time[tid()]);
batch_latencies <<< lat;
Expand All @@ -23,11 +24,11 @@ probe process(@1).mark("row_cache_update_one_batch_end") {
}
}

probe process(@1).mark("row_cache_update_start") {
probe process.mark("row_cache_update_start") {
start_time[tid()] = gettimeofday_us()
}

probe process(@1).mark("row_cache_update_end") {
probe process.mark("row_cache_update_end") {
if (start_time[tid()]) {
lat = (gettimeofday_us() - start_time[tid()]);
latencies <<< lat;
Expand Down

0 comments on commit 95b3eaa

Please sign in to comment.