Rename key to server_latency_ms to be self-explanatory
This commit is contained in:
parent
a032cc08e0
commit
18f9f79fe8
@ -188,13 +188,13 @@ DECLARE
|
||||
remote_server_version text := @extschema@.__CDB_FS_Foreign_Server_Version_PG(server_internal);
|
||||
remote_postgis_version text := @extschema@.__CDB_FS_Foreign_PostGIS_Version_PG(server_internal);
|
||||
remote_server_options jsonb := @extschema@.__CDB_FS_Foreign_Server_Options_PG(server_internal);
|
||||
remote_server_latency float := @extschema@.__CDB_FS_Foreign_Server_Latency_PG(server_internal);
|
||||
remote_server_latency_ms float := @extschema@.__CDB_FS_Foreign_Server_Latency_PG(server_internal);
|
||||
BEGIN
|
||||
RETURN jsonb_build_object(
|
||||
'server_version', remote_server_version,
|
||||
'postgis_version', remote_postgis_version,
|
||||
'server_options', remote_server_options,
|
||||
'server_latency', remote_server_latency
|
||||
'server_latency_ms', remote_server_latency_ms
|
||||
);
|
||||
END
|
||||
$$
|
||||
|
@ -58,8 +58,8 @@ SELECT '1.5', cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback') @>
|
||||
SELECT '1.6', cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback') @> '{"server_options": {"host": "localhost", "port": "@@PGPORT@@", "updatable": "false", "extensions": "postgis", "fetch_size": "1000", "use_remote_estimate": "true"}}'::jsonb;
|
||||
|
||||
\echo '%% It returns the network latency to the remote server'
|
||||
SELECT '2.1', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency')::float > 0.0;
|
||||
SELECT '2.2', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency')::float < 1000.0;
|
||||
SELECT '2.1', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency_ms')::float > 0.0;
|
||||
SELECT '2.2', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency_ms')::float < 1000.0;
|
||||
|
||||
\echo '%% It raises an error if the wrong port is provided'
|
||||
SELECT 'C2', cartodb.CDB_Federated_Server_Register_PG(server => 'wrong-port'::text, config => '{
|
||||
|
Loading…
Reference in New Issue
Block a user