Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table gcp_sql_database_instance_metric_cpu_utilization closes #257 #259

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jun 28, 2021

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results

Basic info

select
  instance_id,
  minimum,
  maximum,
  average,
  sample_count,
  timestamp
from
  gcp_sql_database_instance_metric_cpu_utilization
order by
  instance_id;
+-----------------------+----------------------+----------------------+----------------------+--------------+--------------------------+
| instance_id           | minimum              | maximum              | average              | sample_count | timestamp                |
+-----------------------+----------------------+----------------------+----------------------+--------------+--------------------------+
| parker-aaa:db-connect | 0.019236166666666648 | 0.02149190277777778  | 0.019986791666666663 | 5            | 2021-06-28T10:52:08Z     |
| parker-aaa:db-connect | 0.01826265277777776  | 0.02149190277777778  | 0.018801822222222226 | 5            | 2021-06-28T10:57:08Z     |
| parker-aaa:db-connect | 0.019471069444444388 | 0.02149190277777778  | 0.020437358796296302 | 6            | 2021-06-28T11:07:08Z     |
| parker-aaa:db-connect | 0.02149190277777778  | 0.030539222222222228 | 0.026571170138888888 | 4            | 2021-06-28T10:47:08Z     |
| parker-aaa:db-connect | 0.019113444444444443 | 0.020928305555555582 | 0.01973682500000001  | 5            | 2021-06-28T11:02:08Z     |
| parker-aaa:db-connect | 0.020226972222222212 | 0.022351805555555514 | 0.02105067499999998  | 5            | 2021-06-28T11:12:08.340Z |
| parker-aaa:db-connect | 0.022351805555555514 | 0.06078743055555557  | 0.040621510416666666 | 4            | 2021-06-28T10:42:08Z     |
+-----------------------+----------------------+----------------------+----------------------+--------------+--------------------------+

Intervals averaging < 1%

select
  instance_id,
  round(minimum::numeric,2) as min_cpu,
  round(maximum::numeric,2) as max_cpu,
  round(average::numeric,2) as avg_cpu,
  sample_count
from
  gcp_sql_database_instance_metric_cpu_utilization
where average < 1
order by
  instance_id;
+-----------------------+---------+---------+---------+--------------+
| instance_id           | min_cpu | max_cpu | avg_cpu | sample_count |
+-----------------------+---------+---------+---------+--------------+
| parker-aaa:db-connect | 0.02    | 0.02    | 0.02    | 5            |
| parker-aaa:db-connect | 0.02    | 0.02    | 0.02    | 5            |
| parker-aaa:db-connect | 0.02    | 0.02    | 0.02    | 6            |
| parker-aaa:db-connect | 0.02    | 0.03    | 0.03    | 4            |
| parker-aaa:db-connect | 0.02    | 0.02    | 0.02    | 5            |
| parker-aaa:db-connect | 0.02    | 0.02    | 0.02    | 5            |
| parker-aaa:db-connect | 0.02    | 0.06    | 0.04    | 4            |
+-----------------------+---------+---------+---------+--------------+

@ParthaI ParthaI requested a review from Subhajit97 June 28, 2021 11:18
@ParthaI ParthaI self-assigned this Jun 28, 2021
@ParthaI ParthaI linked an issue Jun 28, 2021 that may be closed by this pull request
gcp/plugin.go Outdated Show resolved Hide resolved
Copy link

@rajlearner17 rajlearner17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cbruno10 cbruno10 merged commit a10de67 into main Jun 29, 2021
@cbruno10 cbruno10 deleted the issue-257 branch June 29, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table gcp_sql_database_instance_metric_cpu_utilization
4 participants