renderer: add updateFrame critical region timings for dev benchmark

This commit is contained in:
Qwerasd
2024-08-22 21:00:15 -04:00
parent 5714c2feed
commit ff0c1141da

View File

@ -891,6 +891,14 @@ pub fn updateFrame(
// Update all our data as tightly as possible within the mutex. // Update all our data as tightly as possible within the mutex.
var critical: Critical = critical: { var critical: Critical = critical: {
// const start = try std.time.Instant.now();
// const start_micro = std.time.microTimestamp();
// defer {
// const end = std.time.Instant.now() catch unreachable;
// // "[updateFrame critical time] <START us>\t<TIME_TAKEN us>"
// std.log.err("[updateFrame critical time] {}\t{}", .{start_micro, end.since(start) / std.time.ns_per_us});
// }
state.mutex.lock(); state.mutex.lock();
defer state.mutex.unlock(); defer state.mutex.unlock();