Skip to content

Commit

Permalink
vaxis: remove render stats
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed Oct 15, 2024
1 parent 313096c commit 802b40b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/Vaxis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ next_img_id: u32 = 1,

unicode: Unicode,

// statistics
renders: usize = 0,
render_dur: u64 = 0,
render_timer: std.time.Timer,

sgr: enum {
standard,
legacy,
Expand Down Expand Up @@ -100,7 +95,6 @@ pub fn init(alloc: std.mem.Allocator, opts: Options) !Vaxis {
.opts = opts,
.screen = .{},
.screen_last = .{},
.render_timer = try std.time.Timer.start(),
.unicode = try Unicode.init(alloc),
};
}
Expand All @@ -124,11 +118,6 @@ pub fn deinit(self: *Vaxis, alloc: ?std.mem.Allocator, tty: AnyWriter) void {
self.screen.deinit(a);
self.screen_last.deinit(a);
}
if (self.renders > 0) {
const tpr = @divTrunc(self.render_dur, self.renders);
log.debug("total renders = {d}\r", .{self.renders});
log.debug("microseconds per render = {d}\r", .{tpr});
}
self.unicode.deinit();
}

Expand Down Expand Up @@ -318,12 +307,6 @@ pub fn queueRefresh(self: *Vaxis) void {

/// draws the screen to the terminal
pub fn render(self: *Vaxis, tty: AnyWriter) !void {
self.renders += 1;
self.render_timer.reset();
defer {
self.render_dur += self.render_timer.read() / std.time.ns_per_us;
}

defer self.refresh = false;

// Set up sync before we write anything
Expand Down

0 comments on commit 802b40b

Please sign in to comment.