Skip to content

Commit

Permalink
Add execution_count and total_elapsed_time fields to SQLServer Samples (
Browse files Browse the repository at this point in the history
#11652)

 Send execution_count and total_elapsed_time fields to be used for dur calc in the backend
  • Loading branch information
jmeunier28 committed Mar 14, 2022
1 parent 1eeeb08 commit bba64f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sqlserver/datadog_checks/sqlserver/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,5 +441,7 @@ def _collect_plans(self, rows, cursor, deadline):
'query_hash': row['query_hash'],
'query_plan_hash': row['query_plan_hash'],
'plan_handle': row['plan_handle'],
'execution_count': row.get('execution_count', None),
'total_elapsed_time': row.get('total_elapsed_time', None),
},
}
2 changes: 1 addition & 1 deletion sqlserver/tests/test_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def dbm_instance(instance_docker):
],
],
)
def test_get_available_query_metrics_columns(aggregator, dbm_instance, expected_columns, available_columns):
def test_get_available_query_metrics_columns(dbm_instance, expected_columns, available_columns):
check = SQLServer(CHECK_NAME, {}, [dbm_instance])
check.initialize_connection()
_conn_key_prefix = "dbm-"
Expand Down

0 comments on commit bba64f0

Please sign in to comment.