chore: config update for low perf condition

This commit is contained in:
arkohut 2024-10-15 10:33:29 +08:00
parent 20fde75633
commit b400f4e79c
2 changed files with 7 additions and 5 deletions

View File

@ -934,8 +934,8 @@ class LibraryFileHandler(FileSystemEventHandler):
library_id,
include_files,
max_workers=2,
sparsity_factor=2,
window_size=20,
sparsity_factor=3,
window_size=10,
):
self.library_id = library_id
self.include_files = include_files
@ -945,7 +945,7 @@ class LibraryFileHandler(FileSystemEventHandler):
self.executor = ThreadPoolExecutor(max_workers=max_workers)
self.lock = threading.Lock()
self.sparsity_window = 3
self.sparsity_window = 6
self.sparsity_factor = sparsity_factor
self.window_size = window_size
@ -1089,7 +1089,7 @@ def watch(
3.0, "--sparsity-factor", "-sf", help="Sparsity factor for file processing"
),
window_size: int = typer.Option(
20, "--window-size", "-ws", help="Window size for rate calculation"
10, "--window-size", "-ws", help="Window size for rate calculation"
),
verbose: bool = typer.Option(False, "--verbose", "-v", help="Enable verbose logging")
):

View File

@ -222,7 +222,7 @@ def record(
@app.command("watch")
def watch_default_library(
window_size: int = typer.Option(
20, "--window-size", "-ws", help="Window size for rate calculation"
10, "--window-size", "-ws", help="Window size for rate calculation"
),
sparsity_factor: float = typer.Option(
3.0, "--sparsity-factor", "-sf", help="Sparsity factor for file processing"
@ -479,6 +479,7 @@ def ps():
for service in services:
processes = [p for p in psutil.process_iter(['pid', 'name', 'cmdline', 'create_time'])
if 'python' in p.info['name'].lower() and
p.info['cmdline'] is not None and
'memos.commands' in p.info['cmdline'] and
service in p.info['cmdline']]
@ -509,6 +510,7 @@ def stop():
for service in services:
processes = [p for p in psutil.process_iter(['pid', 'name', 'cmdline'])
if 'python' in p.info['name'].lower() and
p.info['cmdline'] is not None and
'memos.commands' in p.info['cmdline'] and
service in p.info['cmdline']]