summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2025-07-09 15:26:53 +0000
committerTom Lane2025-07-09 15:26:53 +0000
commit9dcc7641444f6a99269b446ee3a45a080b6ceea3 (patch)
treeb546da0866b6314316e99196d396f9bf8efc87cf /doc/src
parent167ed8082f40ee1f3f4cd18cf02bd6d17df57dab (diff)
Minor tweaks for pg_test_timing.
Increase the size of the "direct" histogram to 10K elements, so that we can precisely track loop times up to 10 microseconds. (Going further than that seems pretty uninteresting, even for very old and slow machines.) Relabel "Per loop time" as "Average loop time" for clarity. Pre-zero the histogram arrays to make sure that they are loaded into processor cache and any copy-on-write overhead has happened before we enter the timing loop. Also use unlikely() to keep the compiler from thinking that the clock-went-backwards case is part of the hot loop. Neither of these hacks made a lot of difference on my own machine, but they seem like they might help on some platforms. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pgtesttiming.sgml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/pgtesttiming.sgml b/doc/src/sgml/ref/pgtesttiming.sgml
index 1fcdbf7f06e..afe6a12be4b 100644
--- a/doc/src/sgml/ref/pgtesttiming.sgml
+++ b/doc/src/sgml/ref/pgtesttiming.sgml
@@ -161,7 +161,7 @@ PostgreSQL documentation
<para>
<screen><![CDATA[
Testing timing overhead for 3 seconds.
-Per loop time including overhead: 16.40 ns
+Average loop time including overhead: 16.40 ns
Histogram of timing durations:
<= ns % of total running % count
0 0.0000 0.0000 0