ruby-pg-extras 5.6.10 → 5.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e83bf4f28c5787471b99dd44988a4df7b69e2d21cedbc27ddb574c3b32aee770
4
- data.tar.gz: a24ad63c91f0aae72645d8395fce8b44e9bcea0f0b2cf919d99182250278d26f
3
+ metadata.gz: b23e346da6e99fb465d32bf8c1adc501d66e7d7c07a62990d9ba10d6b451d481
4
+ data.tar.gz: 05f543fd097b4ff4ed2681c60e05a965dcb3093165288c4e8fa156f3240802dd
5
5
  SHA512:
6
- metadata.gz: 58148034d90c24168c80ebebbfb99e1193fb8e334919b92b7a25414df0c8645764431e54758767f614ac68901899db6de5245f6097c3c2e83179953945f1f6cc
7
- data.tar.gz: b61156df0146cbbd2872b73c4a1e0ba221fdae19426f6402432ebf3b7ebedec442427c3e1852513f577572ed3c329d5fc9e83ac896c3e6355f9757c285943964
6
+ metadata.gz: ee73b560f5905c6d34fb57a243be145aaf3f0280983a97e54b76d44fdc5eb7a70c4423266106be66d94f41c3286f1b6758aafbefb73b332db174bee87db567bb
7
+ data.tar.gz: befaa04fae7ddef434630e61fec8d74ccb77cca3953151e4c1bd86cabf8a14884044dc5606a7f63d080afa9074290439891eacbab03f99e4b3e0666f5efaaf84
data/README.md CHANGED
@@ -364,19 +364,19 @@ This command displays all the current locks, regardless of their type.
364
364
 
365
365
  RubyPgExtras.outliers(args: { limit: 20 })
366
366
 
367
- query | exec_time | prop_exec_time | ncalls | sync_io_time
368
- -----------------------------------------+------------------+----------------+-------------+--------------
369
- SELECT * FROM archivable_usage_events.. | 154:39:26.431466 | 72.2% | 34,211,877 | 00:00:00
370
- COPY public.archivable_usage_events (.. | 50:38:33.198418 | 23.6% | 13 | 13:34:21.00108
371
- COPY public.usage_events (id, reporte.. | 02:32:16.335233 | 1.2% | 13 | 00:34:19.784318
372
- INSERT INTO usage_events (id, retaine.. | 01:42:59.436532 | 0.8% | 12,328,187 | 00:00:00
373
- SELECT * FROM usage_events WHERE (alp.. | 01:18:10.754354 | 0.6% | 102,114,301 | 00:00:00
374
- UPDATE usage_events SET reporter_id =.. | 00:52:35.683254 | 0.4% | 23,786,348 | 00:00:00
375
- INSERT INTO usage_events (id, retaine.. | 00:49:24.952561 | 0.4% | 21,988,201 | 00:00:00
367
+ query | exec_time | prop_exec_time | ncalls | avg_exec_ms | sync_io_time
368
+ -----------------------------------------+------------------+----------------+-------------+-------------+--------------
369
+ SELECT * FROM archivable_usage_events.. | 154:39:26.431466 | 72.2% | 34,211,877 | 16 | 00:00:00
370
+ COPY public.archivable_usage_events (.. | 50:38:33.198418 | 23.6% | 13 | 14014481 | 13:34:21.00108
371
+ COPY public.usage_events (id, reporte.. | 02:32:16.335233 | 1.2% | 13 | 70332 | 00:34:19.784318
372
+ INSERT INTO usage_events (id, retaine.. | 01:42:59.436532 | 0.8% | 12,328,187 | 0 | 00:00:00
373
+ SELECT * FROM usage_events WHERE (alp.. | 01:18:10.754354 | 0.6% | 102,114,301 | 0 | 00:00:00
374
+ UPDATE usage_events SET reporter_id =.. | 00:52:35.683254 | 0.4% | 23,786,348 | 0 | 00:00:00
375
+ INSERT INTO usage_events (id, retaine.. | 00:49:24.952561 | 0.4% | 21,988,201 | 0 | 00:00:00
376
376
  (truncated results for brevity)
377
377
  ```
378
378
 
379
- This command displays statements, obtained from `pg_stat_statements`, ordered by the amount of time to execute in aggregate. This includes the statement itself, the total execution time for that statement, the proportion of total execution time for all statements that statement has taken up, the number of times that statement has been called, and the amount of time that statement spent on synchronous I/O (reading/writing from the file system).
379
+ This command displays statements, obtained from `pg_stat_statements`, ordered by the amount of time to execute in aggregate. This includes the statement itself, the total execution time for that statement, the proportion of total execution time for all statements that statement has taken up, the number of times that statement has been called, the average execution time per call in milliseconds, and the amount of time that statement spent on synchronous I/O (reading/writing from the file system).
380
380
 
381
381
  Typically, an efficient query will have an appropriate ratio of calls to total execution time, with as little time spent on I/O as possible. Queries that have a high total execution time but low call count should be investigated to improve their performance. Queries that have a high proportion of execution time being spent on synchronous I/O should also be investigated.
382
382
 
@@ -388,15 +388,15 @@ Typically, an efficient query will have an appropriate ratio of calls to total e
388
388
 
389
389
  RubyPgExtras.calls(args: { limit: 10 })
390
390
 
391
- qry | exec_time | prop_exec_time | ncalls | sync_io_time
392
- -----------------------------------------+------------------+----------------+-------------+--------------
393
- SELECT * FROM usage_events WHERE (alp.. | 01:18:11.073333 | 0.6% | 102,120,780 | 00:00:00
394
- BEGIN | 00:00:51.285988 | 0.0% | 47,288,662 | 00:00:00
395
- COMMIT | 00:00:52.31724 | 0.0% | 47,288,615 | 00:00:00
396
- SELECT * FROM archivable_usage_event.. | 154:39:26.431466 | 72.2% | 34,211,877 | 00:00:00
397
- UPDATE usage_events SET reporter_id =.. | 00:52:35.986167 | 0.4% | 23,788,388 | 00:00:00
398
- INSERT INTO usage_events (id, retaine.. | 00:49:25.260245 | 0.4% | 21,990,326 | 00:00:00
399
- INSERT INTO usage_events (id, retaine.. | 01:42:59.436532 | 0.8% | 12,328,187 | 00:00:00
391
+ qry | exec_time | prop_exec_time | ncalls | avg_exec_ms | sync_io_time
392
+ -----------------------------------------+------------------+----------------+-------------+-------------+--------------
393
+ SELECT * FROM usage_events WHERE (alp.. | 01:18:11.073333 | 0.6% | 102,120,780 | 0 | 00:00:00
394
+ BEGIN | 00:00:51.285988 | 0.0% | 47,288,662 | 0 | 00:00:00
395
+ COMMIT | 00:00:52.31724 | 0.0% | 47,288,615 | 0 | 00:00:00
396
+ SELECT * FROM archivable_usage_event.. | 154:39:26.431466 | 72.2% | 34,211,877 | 16 | 00:00:00
397
+ UPDATE usage_events SET reporter_id =.. | 00:52:35.986167 | 0.4% | 23,788,388 | 0 | 00:00:00
398
+ INSERT INTO usage_events (id, retaine.. | 00:49:25.260245 | 0.4% | 21,990,326 | 0 | 00:00:00
399
+ INSERT INTO usage_events (id, retaine.. | 01:42:59.436532 | 0.8% | 12,328,187 | 0 | 00:00:00
400
400
  (truncated results for brevity)
401
401
  ```
402
402
 
@@ -4,6 +4,7 @@ SELECT query AS qry,
4
4
  interval '1 millisecond' * total_exec_time AS exec_time,
5
5
  to_char((total_exec_time/sum(total_exec_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
6
6
  to_char(calls, 'FM999G999G990') AS ncalls,
7
+ ROUND(total_exec_time/calls) AS avg_exec_ms,
7
8
  interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
9
10
  ORDER BY calls DESC LIMIT %{limit};
@@ -4,6 +4,7 @@ SELECT query AS qry,
4
4
  interval '1 millisecond' * total_exec_time AS exec_time,
5
5
  to_char((total_exec_time/sum(total_exec_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
6
6
  to_char(calls, 'FM999G999G990') AS ncalls,
7
+ ROUND(total_exec_time/calls) AS avg_exec_ms,
7
8
  interval '1 millisecond' * (shared_blk_read_time + shared_blk_write_time) AS sync_io_time
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
9
10
  ORDER BY calls DESC LIMIT %{limit};
@@ -4,6 +4,7 @@ SELECT query AS qry,
4
4
  interval '1 millisecond' * total_time AS exec_time,
5
5
  to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
6
6
  to_char(calls, 'FM999G999G990') AS ncalls,
7
+ ROUND(total_time/calls) AS avg_exec_ms,
7
8
  interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
9
10
  ORDER BY calls DESC LIMIT %{limit};
@@ -3,6 +3,7 @@
3
3
  SELECT interval '1 millisecond' * total_exec_time AS total_exec_time,
4
4
  to_char((total_exec_time/sum(total_exec_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
5
5
  to_char(calls, 'FM999G999G999G990') AS ncalls,
6
+ ROUND(total_exec_time/calls) AS avg_exec_ms,
6
7
  interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time,
7
8
  query AS query
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
@@ -3,6 +3,7 @@
3
3
  SELECT interval '1 millisecond' * total_exec_time AS total_exec_time,
4
4
  to_char((total_exec_time/sum(total_exec_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
5
5
  to_char(calls, 'FM999G999G999G990') AS ncalls,
6
+ ROUND(total_exec_time/calls) AS avg_exec_ms,
6
7
  interval '1 millisecond' * (shared_blk_read_time + shared_blk_write_time) AS sync_io_time,
7
8
  query AS query
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
@@ -3,6 +3,7 @@
3
3
  SELECT interval '1 millisecond' * total_time AS total_exec_time,
4
4
  to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%%' AS prop_exec_time,
5
5
  to_char(calls, 'FM999G999G999G990') AS ncalls,
6
+ ROUND(total_time/calls) AS avg_exec_ms,
6
7
  interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time,
7
8
  query AS query
8
9
  FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyPgExtras
4
- VERSION = "5.6.10"
4
+ VERSION = "5.6.11"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.10
4
+ version: 5.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-07 00:00:00.000000000 Z
11
+ date: 2025-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg