Move database timer logging to seperate logger
This commit is contained in:
parent
7f911ef4e3
commit
c1b34af441
|
@ -35,6 +35,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
sql_logger = logging.getLogger("synapse.storage.SQL")
|
sql_logger = logging.getLogger("synapse.storage.SQL")
|
||||||
transaction_logger = logging.getLogger("synapse.storage.txn")
|
transaction_logger = logging.getLogger("synapse.storage.txn")
|
||||||
|
perf_logger = logging.getLogger("synapse.storage.TIME")
|
||||||
|
|
||||||
|
|
||||||
metrics = synapse.metrics.get_metrics_for("synapse.storage")
|
metrics = synapse.metrics.get_metrics_for("synapse.storage")
|
||||||
|
@ -268,7 +269,7 @@ class SQLBaseStore(object):
|
||||||
time_now - time_then, limit=3
|
time_now - time_then, limit=3
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info(
|
perf_logger.info(
|
||||||
"Total database time: %.3f%% {%s} {%s}",
|
"Total database time: %.3f%% {%s} {%s}",
|
||||||
ratio * 100, top_three_counters, top_3_event_counters
|
ratio * 100, top_three_counters, top_3_event_counters
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue