diff --git a/Program.cs b/Program.cs index 2e6ad5c..36e90e7 100644 --- a/Program.cs +++ b/Program.cs @@ -194,7 +194,7 @@ internal static class Program checkpointPath = string.IsNullOrWhiteSpace(checkpointPath) ? "stage_checkpoint.json" : checkpointPath; var checkpointEnabled = !string.IsNullOrWhiteSpace(checkpointPath); - void SaveCheckpoint(List snapshot, int lastId) + void SaveCheckpoint(List snapshot, int lastId, TimeSpan levelElapsed) { if (!checkpointEnabled) return; // 매 레벨마다(또는 마지막 레벨) 누적 JSON을 디스크에 기록한다. @@ -202,7 +202,7 @@ internal static class Program { var json = JsonSerializer.Serialize(snapshot, options); File.WriteAllText(checkpointPath, json); - status.ShowLine($"체크포인트 저장: 레벨 {lastId}까지 -> {checkpointPath}"); + status.ShowLine($"체크포인트 저장: 레벨 {lastId}까지 ({StatusReporter.FormatDuration(levelElapsed)}) -> {checkpointPath}"); } catch (Exception ex) { @@ -488,7 +488,7 @@ internal sealed class LevelGenerator _trace = Environment.GetEnvironmentVariable("NEKOBAN_DEBUG") == "1"; } - public List BuildRange(int startId, int endId, Action, int>? onCheckpoint = null) + public List BuildRange(int startId, int endId, Action, int, TimeSpan>? onCheckpoint = null) { foreach (var band in _bands) { @@ -506,8 +506,9 @@ internal sealed class LevelGenerator var levelStopwatch = Stopwatch.StartNew(); var level = BuildSingle(id, band, levelStopwatch); level = TrimLevel(level); + levelStopwatch.Stop(); output.Add(level); - onCheckpoint?.Invoke(output, id); + onCheckpoint?.Invoke(output, id, levelStopwatch.Elapsed); } return output; diff --git a/bin/Debug/net7.0/nekoban_map_gen.dll b/bin/Debug/net7.0/nekoban_map_gen.dll index 8aa6b3c..63f1384 100644 Binary files a/bin/Debug/net7.0/nekoban_map_gen.dll and b/bin/Debug/net7.0/nekoban_map_gen.dll differ diff --git a/bin/Debug/net7.0/nekoban_map_gen.pdb b/bin/Debug/net7.0/nekoban_map_gen.pdb index c363da8..40721b3 100644 Binary files a/bin/Debug/net7.0/nekoban_map_gen.pdb and b/bin/Debug/net7.0/nekoban_map_gen.pdb differ diff --git a/obj/Debug/net7.0/nekoban_map_gen.dll b/obj/Debug/net7.0/nekoban_map_gen.dll index 8aa6b3c..63f1384 100644 Binary files a/obj/Debug/net7.0/nekoban_map_gen.dll and b/obj/Debug/net7.0/nekoban_map_gen.dll differ diff --git a/obj/Debug/net7.0/nekoban_map_gen.pdb b/obj/Debug/net7.0/nekoban_map_gen.pdb index c363da8..40721b3 100644 Binary files a/obj/Debug/net7.0/nekoban_map_gen.pdb and b/obj/Debug/net7.0/nekoban_map_gen.pdb differ diff --git a/obj/Debug/net7.0/ref/nekoban_map_gen.dll b/obj/Debug/net7.0/ref/nekoban_map_gen.dll index fdd1efc..f1feabd 100644 Binary files a/obj/Debug/net7.0/ref/nekoban_map_gen.dll and b/obj/Debug/net7.0/ref/nekoban_map_gen.dll differ diff --git a/obj/Debug/net7.0/refint/nekoban_map_gen.dll b/obj/Debug/net7.0/refint/nekoban_map_gen.dll index fdd1efc..f1feabd 100644 Binary files a/obj/Debug/net7.0/refint/nekoban_map_gen.dll and b/obj/Debug/net7.0/refint/nekoban_map_gen.dll differ