From 97c1cd66580ef191b8968ee2b35c47bd8d2a3fff Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 30 Jul 2016 02:24:51 +0900 Subject: stats: fix bug introduced in earlier commit Commit 76387aba26574d0d96af688cf11d10bd165171f7 broke the script in case of timing_total=true. --- player/lua/stats.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 938efa33ce..a9dc8dbba0 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -185,8 +185,7 @@ local function append_perfdata(s) local last_s = vo_p["render-last"] + vo_p["present-last"] + vo_p["upload-last"] local avg_s = vo_p["render-avg"] + vo_p["present-avg"] + vo_p["upload-avg"] - --local peak_s = vo_p["render-peak"] + vo_p["present-peak"] + vo_p["upload-peak"] - local peak_s = -math.huge + local peak_s = vo_p["render-peak"] + vo_p["present-peak"] + vo_p["upload-peak"] -- highlight i with a red border when t exceeds the time for one frame -- or yellow when it exceeds a given threshold @@ -239,13 +238,13 @@ local function append_perfdata(s) local f = "%s%s%s{\\fn%s}%s / %s / %s{\\fn%s}%s%s" s[#s+1] = format(f, o.nl, o.indent, o.indent, o.font_mono, hl(vo_p["render-last"], last_s), hl(vo_p["render-avg"], avg_s), - hl(vo_p["render-peak"], peak_s), o.font, o.prefix_sep, rsuffix) + hl(vo_p["render-peak"], -math.huge), o.font, o.prefix_sep, rsuffix) s[#s+1] = format(f, o.nl, o.indent, o.indent, o.font_mono, hl(vo_p["present-last"], last_s), hl(vo_p["present-avg"], avg_s), - hl(vo_p["present-peak"], peak_s), o.font, o.prefix_sep, psuffix) + hl(vo_p["present-peak"], -math.huge), o.font, o.prefix_sep, psuffix) s[#s+1] = format(f, o.nl, o.indent, o.indent, o.font_mono, hl(vo_p["upload-last"], last_s), hl(vo_p["upload-avg"], avg_s), - hl(vo_p["upload-peak"], peak_s), o.font, o.prefix_sep, usuffix) + hl(vo_p["upload-peak"], -math.huge), o.font, o.prefix_sep, usuffix) if o.timing_total then s[#s+1] = format(f, o.nl, o.indent, o.indent, o.font_mono, hl(last_s, last_s), hl(avg_s, avg_s), -- cgit v1.2.3