mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
add performance testing debug info
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from time import time
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from sqlalchemy import (
|
from sqlalchemy import (
|
||||||
@@ -727,6 +728,7 @@ def get_service_ids_with_notifications_on_date(notification_type, date):
|
|||||||
|
|
||||||
|
|
||||||
def dao_update_delivery_receipts(receipts, delivered):
|
def dao_update_delivery_receipts(receipts, delivered):
|
||||||
|
start_time_millis = time() * 1000
|
||||||
new_receipts = []
|
new_receipts = []
|
||||||
for r in receipts:
|
for r in receipts:
|
||||||
if isinstance(r, str):
|
if isinstance(r, str):
|
||||||
@@ -773,3 +775,7 @@ def dao_update_delivery_receipts(receipts, delivered):
|
|||||||
)
|
)
|
||||||
db.session.execute(stmt)
|
db.session.execute(stmt)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
elapsed_time = (time() * 1000) - start_time_millis
|
||||||
|
current_app.logger.info(
|
||||||
|
f"#loadtestperformance batch update query time: {elapsed_time} ms"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user