Skip to content

Commit 1cf0569

Browse files
Merge pull request #33 from gituser12981u2/optimization
ran a profile
2 parents 56bc0f0 + f07b11e commit 1cf0569

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ coverage.xml
3131
.hypothesis/
3232
debug.log
3333

34+
# Performance profile
35+
init_profile.profile
36+
3437
# PyCharm
3538
.idea/
3639

analyse_profile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import pstats
2+
import sys
3+
4+
5+
def analyze_profile(profile_file):
6+
# Create a Stats object from the profile file
7+
stats = pstats.Stats(profile_file)
8+
9+
# Sort the statistics by the cumulative time spent in the function
10+
stats.sort_stats('cumulative')
11+
12+
# Print the ten functions that took the most cumulative time
13+
stats.print_stats(10)
14+
15+
16+
if __name__ == "__main__":
17+
if len(sys.argv) < 2:
18+
print("Usage: python analyze_profile.py profile_file")
19+
else:
20+
analyze_profile(sys.argv[1])

audio_visualizer/__init__.py

100644100755
File mode changed.

example_config/config.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
return {
22
key_binds = {
33
-- The modifier key used for hotkeys. Possible values are 'ctrl', 'shift', 'alt'.
4-
-- Note: On macOS, using 'shift or 'alt' can alter teh character keys.
4+
-- Note: On macOS, using 'shift or 'alt' can alter the character keys.
55
-- For example, 'shift' + 'l' becomes 'L', and 'alt' + 'l' might result in a non-alphanumeric character '¬'.
6+
-- 'alt' works best on windows.
67
-- Users should adjust the 'keys' bindings accordingly if using 'shift' or 'alt'.
78
modifier_key = 'ctrl',
89

0 commit comments

Comments
 (0)