While printing histogram - can we avoid to print row with 0 hits, we use printa(@hist);
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
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)/(10001000) ;
this->key = opString[this->ent->op];
@hist[this->key] = quantize(this->diff);
}
::END
{
printf("\nHistogram of times in N2M");
printa(@hist);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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