Skip to content

Commit d9abb8f

Browse files
committed
Adding perf counter
1 parent 3c54847 commit d9abb8f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spotiplex/main.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Init for Typer app/main functions."""
22

33
import sys
4+
from time import perf_counter
45

56
import typer
67
from loguru import logger
@@ -34,8 +35,12 @@ def generate_env() -> None:
3435
@app.command()
3536
def sync_manual_lists() -> None:
3637
"""Syncs all playlists specified in config file."""
38+
start = perf_counter()
3739
sp_instance = sp_module.Spotiplex(lidarr=False, playlist_id=None)
3840
sp_instance.run()
41+
stop = perf_counter()
42+
print("Elapsed time:", stop, start)
43+
print("Elapsed time during the whole program in seconds:", stop - start)
3944

4045

4146
# Uncomment and complete this function if needed in the future

0 commit comments

Comments
 (0)