mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
This will help to keep us from using deprecated Python features going forward. Signed-off-by: Tristan Partin <tristan@neon.tech>
24 lines
753 B
Python
24 lines
753 B
Python
from __future__ import annotations
|
|
|
|
from fixtures.neon_fixtures import NeonEnv
|
|
|
|
|
|
def test_compute_metrics(neon_simple_env: NeonEnv):
|
|
"""
|
|
Test compute metrics, exposed in the neon_backend_perf_counters and
|
|
neon_perf_counters views
|
|
"""
|
|
env = neon_simple_env
|
|
endpoint = env.endpoints.create_start("main")
|
|
|
|
conn = endpoint.connect()
|
|
cur = conn.cursor()
|
|
|
|
# We don't check that the values make sense, this is just a very
|
|
# basic check that the server doesn't crash or something like that.
|
|
#
|
|
# 1.5 is the minimum version to contain these views.
|
|
cur.execute("CREATE EXTENSION neon VERSION '1.5'")
|
|
cur.execute("SELECT * FROM neon_perf_counters")
|
|
cur.execute("SELECT * FROM neon_backend_perf_counters")
|