Skip to content

Commit

Permalink
Merge pull request #33 from gituser12981u2/optimization
Browse files Browse the repository at this point in the history
ran a profile
  • Loading branch information
gituser12981u2 authored Jun 27, 2024
2 parents 56bc0f0 + f07b11e commit 1cf0569
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ coverage.xml
.hypothesis/
debug.log

# Performance profile
init_profile.profile

# PyCharm
.idea/

Expand Down
20 changes: 20 additions & 0 deletions analyse_profile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pstats
import sys


def analyze_profile(profile_file):
# Create a Stats object from the profile file
stats = pstats.Stats(profile_file)

# Sort the statistics by the cumulative time spent in the function
stats.sort_stats('cumulative')

# Print the ten functions that took the most cumulative time
stats.print_stats(10)


if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python analyze_profile.py profile_file")
else:
analyze_profile(sys.argv[1])
Empty file modified audio_visualizer/__init__.py
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion example_config/config.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
return {
key_binds = {
-- The modifier key used for hotkeys. Possible values are 'ctrl', 'shift', 'alt'.
-- Note: On macOS, using 'shift or 'alt' can alter teh character keys.
-- Note: On macOS, using 'shift or 'alt' can alter the character keys.
-- For example, 'shift' + 'l' becomes 'L', and 'alt' + 'l' might result in a non-alphanumeric character '¬'.
-- 'alt' works best on windows.
-- Users should adjust the 'keys' bindings accordingly if using 'shift' or 'alt'.
modifier_key = 'ctrl',

Expand Down

0 comments on commit 1cf0569

Please sign in to comment.