Explain analyze getrusage tracking - Mailing list pgsql-hackers

From Greg Stark
Subject Explain analyze getrusage tracking
Date
Msg-id AANLkTikdqGshABDgkALheNZna7HBSQwzy39hDe1cn_nf@mail.gmail.com
Whole thread Raw
Responses Re: Explain analyze getrusage tracking
Re: Explain analyze getrusage tracking
List pgsql-hackers
This is an update to my earlier patch to add getrusage resource
tracking to EXPLAIN ANALYZE.

With this patch you get something like:

                                                  QUERY PLAN
--------------------------------------------------------------------------------------------------------------
 Seq Scan on i  (cost=0.00..6919.44 rows=262144 width=101) (actual
time=17.240..1123.751 rows=262144 loops=1)
   Resources: sys=210.000ms user=430.000ms read=33.6MB
   Buffers: shared read=4298
 Total runtime: 1548.651 ms
(4 rows)

The main change is to make it work under Windows. At least I think the
changes should make it work under Windows, I haven't been able to test
it. Actually I'm not to happy with the way I did it, I would be more
inclined to hack the getrusagestub,h definition of struct rusage to
have an instr_time in it so that we can use the same macros directly.
But that's more changes than I would be happy making without being
able to compile them to test them.


--
greg

Attachment

pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: Comparison with "true" in source code
Next
From: Robert Haas
Date:
Subject: Re: Fix for cube picksplit function