Skip to content

Commit 7c980d9

Browse files
Copilot0xrinegade
andcommitted
fix: zig format/lint errors from CI
Co-authored-by: 0xrinegade <101195284+0xrinegade@users.noreply.github.com>
1 parent 0263c80 commit 7c980d9

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

src/bench.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ pub fn runBenchmarks() !void {
504504
// Print header with CI status
505505
const ci_detected = config.num_shards < 32;
506506
std.debug.print("\nAbyssbook Orderbook Benchmark Results{s}:\n", .{if (ci_detected) " (CI Optimized)" else ""});
507-
std.debug.print("=".** 60 ++ "\n");
507+
std.debug.print("=" ** 60 ++ "\n");
508508
std.debug.print("Configuration:\n");
509509
std.debug.print(" Shards: {d}\n", .{config.num_shards});
510510
std.debug.print(" Iterations: {d}\n", .{config.iterations});
@@ -518,7 +518,7 @@ pub fn runBenchmarks() !void {
518518
std.debug.print("{s:<25} {s:>12} {s:>12} {s:>12} {s:>12} {s:>12} {s:>12} {s:>10}\n", .{
519519
"Operation", "Avg (µs)", "P50 (µs)", "P95 (µs)", "P99 (µs)", "Ops/sec", "Total (ms)", "Status"
520520
});
521-
std.debug.print("-".** 105 ++ "\n");
521+
std.debug.print("-" ** 105 ++ "\n");
522522

523523
var results = std.ArrayList(BenchmarkResult).init(allocator);
524524
defer results.deinit();
@@ -575,7 +575,7 @@ pub fn runBenchmarks() !void {
575575
}
576576

577577
// Print summary
578-
std.debug.print("\n" ++ "=".** 60 ++ "\n");
578+
std.debug.print("\n" ++ "=" ** 60 ++ "\n");
579579
std.debug.print("Benchmark Summary:\n");
580580
std.debug.print(" Total benchmarks: {d}\n", .{benchmarks.len});
581581
std.debug.print(" Passed targets: {d}\n", .{passed_count});
@@ -585,7 +585,7 @@ pub fn runBenchmarks() !void {
585585
// Print detailed results for failed benchmarks
586586
if (failed_count > 0) {
587587
std.debug.print("\nDetailed Analysis for Failed Benchmarks:\n");
588-
std.debug.print("-".** 60 ++ "\n");
588+
std.debug.print("-" ** 60 ++ "\n");
589589
for (results.items) |result| {
590590
if (targets.getTargetForOperation(result.operation)) |target| {
591591
if (!result.isWithinTarget(target)) {

src/cache/enhanced_cache.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ pub fn MultiLevelCache(comptime Key: type, comptime Value: type) type {
131131
var checked: usize = 0;
132132
const max_check = @min(self.entries.count(), 50); // Limit scan
133133

134-
while (it.next()) |entry| and (checked < max_check) {
134+
while (it.next()) |entry| {
135+
if (checked >= max_check) break;
135136
checked += 1;
136137

137138
if (candidate_count < MAX_CANDIDATES) {

src/load_test.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ pub const LoadTestResult = struct {
5757
avg_cpu_percent: f64,
5858

5959
pub fn printSummary(self: *const LoadTestResult) void {
60-
std.debug.print("\n" ++ "=".** 80 ++ "\n");
60+
std.debug.print("\n" ++ "=" ** 80 ++ "\n");
6161
std.debug.print("LOAD TEST RESULTS\n");
62-
std.debug.print("=".** 80 ++ "\n");
62+
std.debug.print("=" ** 80 ++ "\n");
6363

6464
std.debug.print("Overall Performance:\n");
6565
std.debug.print(" Total Operations: {d}\n", .{self.total_operations});
@@ -106,7 +106,7 @@ pub const LoadTestResult = struct {
106106
std.debug.print(" Peak Memory: {d:.2} MB\n", .{self.peak_memory_mb});
107107
std.debug.print(" Avg CPU: {d:.1}%\n", .{self.avg_cpu_percent});
108108

109-
std.debug.print("\n" ++ "=".** 80 ++ "\n");
109+
std.debug.print("\n" ++ "=" ** 80 ++ "\n");
110110
}
111111
};
112112

src/metrics_reporter.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub const MetricsReporter = struct {
7070
try writer.print("{s:<25} {s:>12} {s:>12} {s:>12} {s:>12} {s:>12} {s:>12}\n", .{
7171
"Operation", "Avg (µs)", "P50 (µs)", "P95 (µs)", "P99 (µs)", "Ops/sec", "StdDev (µs)"
7272
});
73-
try writer.writeAll("-".** 105 ++ "\n");
73+
try writer.writeAll("-" ** 105 ++ "\n");
7474

7575
for (entries) |entry| {
7676
try writer.print("{s:<25} {d:>12.2} {d:>12.2} {d:>12.2} {d:>12.2} {d:>12.0} {d:>12.2}\n", .{

src/profiler.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub const Profiler = struct {
9999
std.debug.print("\n{s:<30} {s:>12} {s:>12} {s:>12} {s:>8}\n", .{
100100
"Function", "Total (ms)", "Calls", "Avg (µs)", "% Time"
101101
});
102-
std.debug.print("-".** 76 ++ "\n");
102+
std.debug.print("-" ** 76 ++ "\n");
103103

104104
for (results) |result| {
105105
std.debug.print("{s:<30} {d:>12.2} {d:>12} {d:>12.2} {d:>7.1}%\n", .{

src/regression_test.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ pub const RegressionTester = struct {
163163
}
164164

165165
pub fn printResults(results: []const RegressionResult) void {
166-
std.debug.print("\n" ++ "=".** 80 ++ "\n");
166+
std.debug.print("\n" ++ "=" ** 80 ++ "\n");
167167
std.debug.print("PERFORMANCE REGRESSION TEST RESULTS\n");
168-
std.debug.print("=".** 80 ++ "\n");
168+
std.debug.print("=" ** 80 ++ "\n");
169169

170170
var passed_count: usize = 0;
171171
var failed_count: usize = 0;
@@ -190,15 +190,15 @@ pub const RegressionTester = struct {
190190
std.debug.print(" Change: {d:+.1}%\n", .{result.throughput_regression_pct});
191191
}
192192

193-
std.debug.print("\n" ++ "-".** 80 ++ "\n");
193+
std.debug.print("\n" ++ "-" ** 80 ++ "\n");
194194
std.debug.print("Summary: {d} passed, {d} failed\n", .{ passed_count, failed_count });
195195

196196
if (failed_count == 0) {
197197
std.debug.print("✅ All performance regression tests PASSED\n");
198198
} else {
199199
std.debug.print("❌ Performance regression detected!\n");
200200
}
201-
std.debug.print("=".** 80 ++ "\n");
201+
std.debug.print("=" ** 80 ++ "\n");
202202
}
203203
};
204204

0 commit comments

Comments
 (0)