Skip to content

Commit

Permalink
profile: disable
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Isken committed Mar 4, 2024
1 parent 5512ea6 commit 49e84e4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/qseek/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import asyncio
import logging
from collections import deque
from cProfile import Profile

# from cProfile import Profile
from datetime import datetime, timedelta, timezone
from itertools import chain
from pathlib import Path
Expand Down Expand Up @@ -56,7 +57,7 @@
logger = logging.getLogger(__name__)

SamplingRate = Literal[10, 20, 25, 50, 100, 200]
p = Profile()
# p = Profile()


class SearchStats(Stats):
Expand Down Expand Up @@ -720,7 +721,7 @@ async def search(
tuple[list[EventDetection], Trace]: The event detections and the
semblance traces used for the search.
"""
p.enable()
# p.enable()
parent = self.parent
sampling_rate = parent.semblance_sampling_rate

Expand Down Expand Up @@ -885,6 +886,6 @@ async def search(

detections.append(detection)

p.disable()
p.dump_stats("search.prof")
# p.disable()
# p.dump_stats("search.prof")
return detections, semblance.get_trace()

0 comments on commit 49e84e4

Please sign in to comment.