This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create schema if not exists conmon; | |
| create table if not exists conmon.connection_activity_history ( | |
| snapshot_id bigint generated always as identity primary key, | |
| sampled_at timestamptz not null default now(), | |
| total_backends integer not null, | |
| active_backends integer not null, | |
| idle_backends integer not null, | |
| waiting_backends integer not null, | |
| app_connections jsonb not null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const makeid = length => { | |
| let text = "" | |
| const possible = "ABCDEFGHIJKLMNPQRSTUVWXYZ0123456789" | |
| for (let i = 0; i < length; i += 1) { | |
| text += possible.charAt(Math.floor(Math.random() * possible.length)) | |
| } | |
| return text | |
| } | |
| const buildMetadataFromHeaders = headers => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sleep = ms => { | |
| return new Promise(resolve => { | |
| setTimeout(resolve, ms) | |
| }) | |
| } | |
| const makeid = length => { | |
| let text = "" | |
| const possible = "ABCDEFGHIJKLMNPQRSTUVWXYZ0123456789" | |
| for (let i = 0; i < length; i += 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function() { | |
| var doc = document, | |
| htm = doc.documentElement, | |
| lct = null, // last click target | |
| nearest = function(elm, tag) { | |
| while (elm && elm.nodeName != tag) { | |
| elm = elm.parentNode; | |
| } | |
| return elm; | |
| }; |