Re: "ago" times on buildfarm status page

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "ago" times on buildfarm status page
Date: 2019-08-21 14:52:59
Message-ID: 04fdc0e7-1a16-acc2-7109-e5277062d325@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 8/21/19 8:32 AM, Dagfinn Ilmari Mannsåker wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>
>> On Wed, Aug 21, 2019 at 9:40 AM Peter Eisentraut <
>> peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>>
>>> I find the time displays like
>>>
>>> 01:03 ago
>>>
>>> on the buildfarm status page unhelpful.
>>>
>>> First, I can never tell whether this is hours-minutes or minutes-seconds
>>> -- there is probably a less ambiguous format available.
>>>
>>> But more importantly, the page doesn't say when it was generated, so a
>>> relative time like this is meaningless. The page might have most
>>> recently reloaded last night. That means when I look at the page, I
>>> *always* have to reload it first to make sense of the times.
>>>
>>> I notice that the page source actually includes absolute times that are
>>> then converted to relative using some JavaScript. Could we perhaps just
>>> turn that off? Or preferably convert to local time. I can much easier
>>> make sense of an absolute local time: I can compare that to the clock in
>>> the corner of the screen, and I can compare that, say, to a commit
>>> timestamp.
>>>
>> It used to be that the "ago" part was generated on the server, but Andrew
>> changed that to the fixed timestamp + javascript to improve cachability and
>> thus performance. Perhaps now that it's that it could be as easy as adding
>> a checkbox to the page (which could remember your preference in a cookie)
>> that switches between the two modes?
> The Javscript could also be made to update the "ago" part every minute,
> and show the absoulte time as a tooltip, which is what pretty much every
> other website does.
>

The code for the page is here:
<https://github.com/PGBuildFarm/server-code/blob/master/templates/status.tt>

Patches welcome.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2019-08-21 15:06:52 Re: Optimization of vacuum for logical replication
Previous Message Tom Lane 2019-08-21 13:55:26 Re: "ago" times on buildfarm status page