Re: Time measurement format - more human readable

Поиск
Список
Период
Сортировка
От Gavin Flower
Тема Re: Time measurement format - more human readable
Дата
Msg-id 54288BDE.8000807@archidevsys.co.nz
обсуждение исходный текст
Ответ на Time measurement format - more human readable  (Bogdan Pilch <bogdan@matfyz.cz>)
Список pgsql-hackers
<div class="moz-cite-prefix">On 29/09/14 00:49, Bogdan Pilch wrote:<br /></div><blockquote
cite="mid:20140928114951.GB22150@artax.karlin.mff.cuni.cz"type="cite"><pre wrap="">Hi,
 
I have created a small patch to postgres source (in particular the
psql part of it) that modifies the way time spent executing the SQL
commands is printed out.

The idea is to have a human readable time printed, e.g.:
Time: 1:32:15.45 m:s:ms
Time: 2_10:12:55:444.033 d_h:m:s:ms

Attached you can find a patch without any regression tests for that as
this is practically impossible to test with regression tests. The
duration of an SQL command (even though using pg_sleep) would differ
on each machine and even between consecutive runs. Therefore one
cannot specify a static expected output.
My patch is relative to origin/REL9_4_STABLE branch as that is the one
I started from.

My plea is to have this change merged into the main stream so that it
becomes available in upcoming releases.

This modification does not require any interaction with user.
It may create backward compatibility issues if some SQL developers
assumed that the format is always <milis>.<micros>.

regards
bogdan

</pre><br /><fieldset class="mimeAttachmentHeader"></fieldset><br /><pre wrap="">
</pre></blockquote> If this is a forced, and not optional, then I think it is a backward step. IMnsHO<br /><br /> For
programmaticanalysis: either <milis>.<micros> or the number, of seconds (with a fractional part), would be
okay.<br/><br /> I would be happy if there was a configuration parameter to control it.  At least a simple boolean to
choosebetween the new & old format - but better still, would be a time format string to allow people to choose the
representationthey consider most appropriate for their own needs.<br /><br /> Having a configuration parameter set to
theoriginal format, would also avoid unnecessary backwards compatibility problems!<br /><br /><br /> Cheers,<br />
Gavin<br/> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}