PG-160: Integration with PGXN.
parent
97a9f44be6
commit
84de947da6
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "pg_stat_monitor",
|
||||
"abstract": "PostgreSQL Query Performance Monitoring Tool",
|
||||
"description": "The pg_stat_monitor is a PostgreSQL Query Performance Monitoring tool, based on PostgreSQL's contrib module pg_stat_statements. PostgreSQL’s pg_stat_statements provides the basic statistics, which is sometimes not enough. The major shortcoming in pg_stat_statements is that it accumulates all the queries and their statistics and does not provide aggregated statistics nor histogram information. In this case, a user needs to calculate the aggregate which is quite expensive.",
|
||||
"version": "0.7.1",
|
||||
"maintainer": [
|
||||
"ibrar.ahmed@percona.com"
|
||||
],
|
||||
"license": "postgresql",
|
||||
"provides": {
|
||||
"pg_stat_monitor": {
|
||||
"abstract": "PostgreSQL Query Performance Monitoring Tool",
|
||||
"file": "pg_stat_monitor--1.0.sql",
|
||||
"docfile": "README.md",
|
||||
"version": "0.7.1"
|
||||
}
|
||||
},
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
"PostgreSQL": "11.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"bugtracker": {
|
||||
"web": "https://jira.percona.com/projects/PG/issues"
|
||||
},
|
||||
"repository": {
|
||||
"url": "https://github.com/percona/pg_stat_monitor.git",
|
||||
"web": "https://github.com/percona/pg_stat_monitor",
|
||||
"type": "git"
|
||||
}
|
||||
},
|
||||
"generated_by": "ibrar.ahmed@percona.com",
|
||||
"meta-spec": {
|
||||
"version": "1.0.0",
|
||||
"url": "http://pgxn.org/meta/spec.txt"
|
||||
},
|
||||
"tags": [
|
||||
"monitoring",
|
||||
"statistics-collector",
|
||||
"statistics"
|
||||
]
|
||||
}
|
||||
|
|
@ -1196,6 +1196,8 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
|
|||
values[i++] = CStringGetTextDatum(pgss->bucket_start_time[entry->key.bucket_id]);
|
||||
for (kind = 0; kind < PGSS_NUMKIND; kind++)
|
||||
{
|
||||
if (tmp.calls[kind].calls == 0)
|
||||
tmp.calls[kind].calls++;
|
||||
values[i++] = Int64GetDatumFast(tmp.calls[kind].calls);
|
||||
values[i++] = Float8GetDatumFast(tmp.time[kind].total_time);
|
||||
values[i++] = Float8GetDatumFast(tmp.time[kind].min_time);
|
||||
|
|
Loading…
Reference in New Issue