Skip to content

Commit 482f88b

Browse files
committed
Trim redundant Rust comments
Remove comments that restate what the adjacent code already says and decorative section dividers, keeping doc comments, SAFETY notes, eBPF and sampler design rationale, and why-explanations. Comments-only change; behavior is identical.
1 parent e0ab7e5 commit 482f88b

44 files changed

Lines changed: 67 additions & 432 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/dashboard/src/dashboard/blockio.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ use crate::plot::*;
44
pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
55
let mut view = View::new(data, sections);
66

7-
/*
8-
* Operations
9-
*/
10-
117
let mut operations = Group::new("Operations", "operations");
128

139
let totals = operations.subgroup("Totals");
@@ -48,10 +44,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
4844

4945
view.group(operations);
5046

51-
/*
52-
* Latency
53-
*/
54-
5547
let mut latency = Group::new("Latency", "latency");
5648

5749
let by_op = latency.subgroup("By Operation");
@@ -66,10 +58,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
6658

6759
view.group(latency);
6860

69-
/*
70-
* IO Size
71-
*/
72-
7361
let mut size = Group::new("Size", "size");
7462

7563
let by_op = size.subgroup("By Operation");

crates/dashboard/src/dashboard/cgroups.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
2626
}
2727
};
2828

29-
// CPU Total Cores
3029
group.plot_promql(
3130
PlotOpts::counter(
3231
"Total CPU Cores",
@@ -36,7 +35,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
3635
format!("{} / 1000000000", rate("cgroup_cpu_usage")),
3736
);
3837

39-
// CPU User Cores
4038
group.plot_promql(
4139
PlotOpts::counter("User CPU Cores", format!("{prefix}-user-cores"), Unit::Count),
4240
if individual {
@@ -46,7 +44,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
4644
},
4745
);
4846

49-
// CPU System Cores
5047
group.plot_promql(
5148
PlotOpts::counter(
5249
"System CPU Cores",
@@ -60,7 +57,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
6057
},
6158
);
6259

63-
// CPU Migrations
6460
group.plot_promql(
6561
PlotOpts::counter(
6662
"CPU Migrations",
@@ -70,7 +66,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
7066
rate("cgroup_cpu_migrations"),
7167
);
7268

73-
// CPU Throttled Time
7469
group.plot_promql(
7570
PlotOpts::counter(
7671
"CPU Throttled Time",
@@ -80,7 +75,6 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
8075
rate("cgroup_cpu_throttled_time"),
8176
);
8277

83-
// IPC
8478
group.plot_promql(
8579
PlotOpts::counter("IPC", format!("{prefix}-ipc"), Unit::Count),
8680
if individual {
@@ -90,13 +84,11 @@ fn add_cgroup_metrics(group: &mut Group, individual: bool) {
9084
},
9185
);
9286

93-
// TLB Flushes
9487
group.plot_promql(
9588
PlotOpts::counter("TLB Flushes", format!("{prefix}-tlb-flush"), Unit::Rate),
9689
rate("cgroup_cpu_tlb_flush"),
9790
);
9891

99-
// Syscalls
10092
group.plot_promql(
10193
PlotOpts::counter("Syscalls", format!("{prefix}-syscall"), Unit::Rate),
10294
rate("cgroup_syscall"),

crates/dashboard/src/dashboard/cpu.rs

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
2020
let mut view = View::new(data, sections);
2121
let multi_cpu = has_multiple_cpus(data);
2222

23-
/*
24-
* Utilization
25-
*/
26-
2723
let mut utilization = Group::new("Utilization", "utilization");
2824

2925
let busy = utilization.subgroup("Total CPU");
@@ -83,10 +79,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
8379

8480
view.group(utilization);
8581

86-
/*
87-
* Performance
88-
*/
89-
9082
let mut performance = Group::new("Performance", "performance");
9183

9284
let ipc = performance.subgroup("Instructions per Cycle");
@@ -166,10 +158,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
166158

167159
view.group(performance);
168160

169-
/*
170-
* Branch Prediction
171-
*/
172-
173161
let mut branch = Group::new("Branch Prediction", "branch-prediction");
174162

175163
let miss = branch.subgroup("Misprediction Rate");
@@ -229,14 +217,8 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
229217

230218
view.group(branch);
231219

232-
/*
233-
* DTLB (Data Translation Lookaside Buffer)
234-
* cpu_dtlb_miss aggregates all variants:
235-
* - unlabeled (AMD/ARM combined)
236-
* - op="load" (Intel)
237-
* - op="store" (Intel)
238-
*/
239-
220+
// cpu_dtlb_miss aggregates all variants: unlabeled (AMD/ARM combined),
221+
// op="load" (Intel), op="store" (Intel).
240222
let mut dtlb = Group::new("DTLB", "dtlb");
241223

242224
let misses = dtlb.subgroup("DTLB Misses");
@@ -278,10 +260,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
278260

279261
view.group(dtlb);
280262

281-
/*
282-
* Migrations
283-
*/
284-
285263
let mut migrations = Group::new("Migrations", "migrations");
286264

287265
let to = migrations.subgroup("Incoming Migrations");
@@ -322,10 +300,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
322300

323301
view.group(migrations);
324302

325-
/*
326-
* TLB Flush
327-
*/
328-
329303
let mut tlb = Group::new("TLB Flush", "tlb-flush");
330304

331305
let total = tlb.subgroup("Total TLB Flushes");

crates/dashboard/src/dashboard/exceptions.rs

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ use crate::plot::*;
99
pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
1010
let mut view = View::new(data, sections);
1111

12-
/*
13-
* Network
14-
*/
15-
1612
let mut network = Group::new("Network", "network");
1713

1814
let drops = network.subgroup("Packet Drops & Transmit Errors");
@@ -31,10 +27,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
3127

3228
view.group(network);
3329

34-
/*
35-
* TCP
36-
*/
37-
3830
let mut tcp = Group::new("TCP", "tcp");
3931

4032
let retransmits = tcp.subgroup("Retransmits");
@@ -49,15 +41,10 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
4941

5042
view.group(tcp);
5143

52-
/*
53-
* Cloud (ENA) allowance limits
54-
*
55-
* AWS surfaces these counters when an instance hits a hardware-enforced
56-
* rate limit. The metrics only appear on ENA-equipped hosts — on
57-
* everything else the queries resolve to empty series and the panels
58-
* stay blank, which is the right behavior.
59-
*/
60-
44+
// AWS surfaces these counters when an instance hits a hardware-enforced
45+
// rate limit. The metrics only appear on ENA-equipped hosts — on
46+
// everything else the queries resolve to empty series and the panels
47+
// stay blank, which is the right behavior.
6148
let mut ena = Group::new("AWS ENA Allowance Exceeded", "ena");
6249

6350
let bw = ena.subgroup("Bandwidth");
@@ -93,10 +80,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
9380

9481
view.group(ena);
9582

96-
/*
97-
* CPU throttling
98-
*/
99-
10083
let mut throttle = Group::new("CPU Throttling", "cpu-throttling");
10184

10285
let events = throttle.subgroup("Throttle Events");
@@ -135,18 +118,13 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
135118

136119
view.group(throttle);
137120

138-
/*
139-
* Block IO
140-
*
141-
* `blockio_errors` is labeled (op, error) where error buckets coarse
142-
* blk_status_t classes: io / timeout / nospc / target / protection /
143-
* unsupported / other. `blockio_requeues` counts requests the block
144-
* layer put back on the queue (driver couldn't complete; SCSI EH or
145-
* NVMe controller reset retried under the covers). Pairing them is
146-
* diagnostic — high requeues with flat errors means recovery is
147-
* absorbing the fault; both rising means real damage.
148-
*/
149-
121+
// `blockio_errors` is labeled (op, error) where error buckets coarse
122+
// blk_status_t classes: io / timeout / nospc / target / protection /
123+
// unsupported / other. `blockio_requeues` counts requests the block
124+
// layer put back on the queue (driver couldn't complete; SCSI EH or
125+
// NVMe controller reset retried under the covers). Pairing them is
126+
// diagnostic — high requeues with flat errors means recovery is
127+
// absorbing the fault; both rising means real damage.
150128
let mut blockio = Group::new("Block IO", "blockio");
151129

152130
let errors = blockio.subgroup("Errors");

crates/dashboard/src/dashboard/gpu.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
2121
let mut view = View::new(data, sections);
2222
let multi_gpu = has_multiple_gpus(data);
2323

24-
/*
25-
* Utilization
26-
*/
27-
2824
let mut utilization = Group::new("Utilization", "utilization");
2925

3026
let gpu = utilization.subgroup("GPU Utilization");
@@ -144,10 +140,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
144140

145141
view.group(activity);
146142

147-
/*
148-
* Memory
149-
*/
150-
151143
let mut memory = Group::new("Memory", "memory");
152144

153145
let capacity = memory.subgroup("Capacity");
@@ -214,10 +206,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
214206

215207
view.group(memory);
216208

217-
/*
218-
* PCIe
219-
*/
220-
221209
let mut pcie = Group::new("PCIe", "pcie");
222210

223211
let rx = pcie.subgroup("Receive");
@@ -263,10 +251,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
263251

264252
view.group(pcie);
265253

266-
/*
267-
* Power
268-
*/
269-
270254
let mut power = Group::new("Power", "power");
271255

272256
let draw = power.subgroup("Power Draw");
@@ -297,10 +281,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
297281

298282
view.group(power);
299283

300-
/*
301-
* Temperature
302-
*/
303-
304284
let mut thermal = Group::new("Temperature", "temperature");
305285

306286
let temps = thermal.subgroup("Temperatures");
@@ -324,10 +304,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
324304

325305
view.group(thermal);
326306

327-
/*
328-
* Clocks
329-
*/
330-
331307
let mut clocks = Group::new("Clocks", "clocks");
332308

333309
let freqs = clocks.subgroup("Clock Frequencies");

crates/dashboard/src/dashboard/memory.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ use crate::plot::*;
44
pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
55
let mut view = View::new(data, sections);
66

7-
/*
8-
* Usage
9-
*/
10-
117
let mut usage = Group::new("Usage", "usage");
128

139
let capacity = usage.subgroup("Capacity");
@@ -46,10 +42,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
4642

4743
view.group(usage);
4844

49-
/*
50-
* NUMA
51-
*/
52-
5345
let mut numa = Group::new("NUMA", "numa");
5446

5547
let locality = numa.subgroup("Local vs Remote");

crates/dashboard/src/dashboard/network.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ use crate::plot::*;
44
pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
55
let mut view = View::new(data, sections);
66

7-
/*
8-
* Traffic
9-
*/
10-
117
let mut traffic = Group::new("Traffic", "traffic");
128

139
let bandwidth = traffic.subgroup("Bandwidth");
@@ -36,10 +32,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
3632

3733
view.group(traffic);
3834

39-
/*
40-
* Errors
41-
*/
42-
4335
let mut errors = Group::new("Errors", "errors");
4436

4537
let health = errors.subgroup("Drops & Retransmits");
@@ -57,10 +49,6 @@ pub fn generate(data: &Tsdb, sections: Vec<Section>) -> View {
5749

5850
view.group(errors);
5951

60-
/*
61-
* TCP
62-
*/
63-
6452
let mut tcp = Group::new("TCP", "tcp");
6553

6654
let latency = tcp.subgroup("Packet Latency");

0 commit comments

Comments
 (0)