oracle / oracle/dtrace

While printing histogram - can we avoid to print row with 0 hits, we use printa(@hist);

Open
#123 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
189
Forks
23
PR merge metrics
No merged PRs in 30d

Description

//Refer attachmenmt file for proper alligned output

histogram.txt

CQ-modify
value ------------- Distribution ------------- count
16 | 0
32 |@@@@@@@@@ 6
64 |@@@@@@@@@@@@@ 10
128 |@@ 1
256 |@@ 1
512 |@@@ 2
1024 |@@ 1
2048 |@@@ 2
4096 |@@ 1
8192 | 0
16384 | 0
32768 | 0
65536 | 0
131072 | 0
262144 |@@ 1
524288 | 0
1048576 | 0
2097152 | 0
4194304 | 0
8388608 | 0
16777216 | 0
33554432 | 0
67108864 | 0
134217728 | 0
268435456 | 0
536870912 | 0
1073741824 | 0
2147483648 | 0
4294967296 | 0
8589934592 | 0
17179869184 | 0
34359738368 | 0
68719476736 | 0
137438953472 | 0

Slack channel discussion - https://corparch-core-srv.slack.com/archives/C9K01JV7F/p1761829230515309

::cmd_ent_put:entry
/
....
(this->ent = (struct mlx5_cmd_work_ent )arg0)
.....
/
{
this->diff = (this->ent->ts2 - this->ent->ts1)/(1000
1000) ;
this->key = opString[this->ent->op];

@hist[this->key] = quantize(this->diff);
}

::END
{
printf("\nHistogram of times in N2M");
printa(@hist);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the printa(@hist) usage and the attached histogram output, then locate the histogram-printing path in the DTrace implementation. Verify how zero-hit rows are emitted and compare the result with the provided alignment example. Done means zero-hit rows are omitted while nonzero buckets retain correct values and alignment.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.