mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-20 10:55:09 +03:00
Revert "TEMPORARY Measure and log test cases"
This reverts commit adfdd6afe1
.
This commit is contained in:
parent
adfdd6afe1
commit
e09b91b9d6
1 changed files with 6 additions and 17 deletions
|
@ -54,7 +54,6 @@ from synapse.util.caches.descriptors import cached
|
||||||
from synapse.util.caches.lrucache import LruCache
|
from synapse.util.caches.lrucache import LruCache
|
||||||
from synapse.util.cancellation import cancellable
|
from synapse.util.cancellation import cancellable
|
||||||
from synapse.util.iterutils import batch_iter
|
from synapse.util.iterutils import batch_iter
|
||||||
from synapse.util.metrics import Measure
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from synapse.server import HomeServer
|
from synapse.server import HomeServer
|
||||||
|
@ -414,22 +413,12 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas
|
||||||
room = await self.get_room(room_id) # type: ignore[attr-defined]
|
room = await self.get_room(room_id) # type: ignore[attr-defined]
|
||||||
if room["has_auth_chain_index"]:
|
if room["has_auth_chain_index"]:
|
||||||
try:
|
try:
|
||||||
with Measure(self.hs.get_clock(), "rei:get_auth_chain_difference_chains") as m:
|
return await self.db_pool.runInteraction(
|
||||||
r = await self.db_pool.runInteraction(
|
"get_auth_chain_difference_chains",
|
||||||
"get_auth_chain_difference_chains",
|
self._get_auth_chain_difference_using_cover_index_txn,
|
||||||
self._get_auth_chain_difference_using_cover_index_txn,
|
room_id,
|
||||||
room_id,
|
state_sets,
|
||||||
state_sets,
|
)
|
||||||
)
|
|
||||||
if m.get_resource_usage().ru_utime > 4.0:
|
|
||||||
logger.info(
|
|
||||||
"REI-ACDC %.2f, ri=%r ss=%r",
|
|
||||||
m.get_resource_usage().ru_utime,
|
|
||||||
room_id,
|
|
||||||
state_sets
|
|
||||||
)
|
|
||||||
return r
|
|
||||||
|
|
||||||
except _NoChainCoverIndex:
|
except _NoChainCoverIndex:
|
||||||
# For whatever reason we don't actually have a chain cover index
|
# For whatever reason we don't actually have a chain cover index
|
||||||
# for the events in question, so we fall back to the old method.
|
# for the events in question, so we fall back to the old method.
|
||||||
|
|
Loading…
Reference in a new issue