PG-179. Skip lines for checking, and badge to README.

Patch By:  Mikhail Samoylov
pull/75/head
Ibrar Ahmed 2021-02-16 12:46:53 +00:00
parent 963e509c65
commit b115d748a8
4 changed files with 11 additions and 4 deletions

View File

@ -11,5 +11,6 @@ jobs:
- name: install cppcheck
run: sudo apt-get install cppcheck
- name: Prepare for install postgresql
run: sudo cppcheck --enable=all --error-exitcode=1 .
- name: Execute linter check with cppcheck
run: sudo cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --check-config .

View File

@ -3,7 +3,7 @@ on: [push]
jobs:
build:
name: pg1-test
name: pg11-test
runs-on: ubuntu-latest
steps:
- name: Clone postgres repository

View File

@ -1,3 +1,7 @@
![pg11-test](https://github.com/percona/pg_stat_monitor/workflows/pg11-test/badge.svg)
![pg12-test](https://github.com/percona/pg_stat_monitor/workflows/pg12-test/badge.svg)
![pg13-test](https://github.com/percona/pg_stat_monitor/workflows/pg13-test/badge.svg)
## What is pg_stat_monitor?
The **pg_stat_monitor** is a **PostgreSQL Query Performance Monitoring** tool, based on PostgreSQL's contrib module ``pg_stat_statements``. PostgreSQLs 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.

View File

@ -183,6 +183,7 @@ static uint64 get_query_id(pgssJumbleState *jstate, Query *query);
/*
* Module load callback
*/
// cppcheck-suppress unusedFunction
void
_PG_init(void)
{
@ -251,6 +252,7 @@ _PG_init(void)
/*
* Module unload callback
*/
// cppcheck-suppress unusedFunction
void
_PG_fini(void)
{
@ -1140,7 +1142,6 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
Datum values[PG_STAT_STATEMENTS_COLS];
bool nulls[PG_STAT_STATEMENTS_COLS];
int i = 0;
int len = 0;
int kind;
Counters tmp;
double stddev;
@ -1167,6 +1168,7 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
}
else
{
int len = 0;
unsigned char *buf = pgss_qbuf[entry->key.bucket_id];
if(read_query(buf, queryid, query_txt) == 0)
{