課題19: デバッグとプロファイリング
マンダトリー要件 (80点)
Part 1: デバッグツール作成 (40点)
ファイル名: part1_debug_tool.zig
const std = @import("std");
pub const DebugLogger = struct {
// TODO: 実装
// タイムスタンプ、ファイル名、行番号付きログ
};
pub const MemoryTracker = struct {
// TODO: 実装
// メモリ割り当て追跡
};
pub fn main() !void {
// テストコード
}
Part 2: プロファイラー (40点)
ファイル名: part2_profiler.zig
const std = @import("std");
pub const Profiler = struct {
// TODO: 実装
// 関数実行時間計測
};
pub fn main() !void {
// ベンチマーク実行
}
ボーナス課題 (20点)
Bonus: カスタムアロケータ (20点)
ファイル名: bonus_allocator.zig
const std = @import("std");
pub const DebugAllocator = struct {
// TODO: 実装
// メモリリーク検出機能付きアロケータ
};
評価基準
| 項目 | 配点 |
|---|---|
| Part 1: デバッグツール | 40点 |
| Part 2: プロファイラー | 40点 |
| Bonus: カスタムアロケータ | 20点 |
参考資料
- Zig Debug: https://ziglang.org/documentation/master/std/#std.debug