-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark_test.py
More file actions
48 lines (38 loc) · 1.62 KB
/
Copy pathbenchmark_test.py
File metadata and controls
48 lines (38 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
"""
Simple test script to demonstrate the benchmarking functionality
"""
import sys
import os
sys.path.append(os.path.dirname(__file__))
from git_repository_manager import GitRepositoryManager, toggle_benchmarking
def main():
print("🚀 Git Repository Manager - Benchmarking Demo")
print("=" * 50)
# Create the application
app = GitRepositoryManager()
print("\n📊 Benchmarking is currently enabled by default.")
print("To test performance:")
print("1. Select a folder with many Git repositories")
print("2. Set branch filters (user or message)")
print("3. Use Debug menu > Profile Branch Filtering")
print("4. Watch console output for performance insights")
print("\nDebug menu options:")
print("- Toggle Benchmarking: Enable/disable performance monitoring")
print("- Profile Repository Loading: Test repository scanning performance")
print("- Profile Branch Filtering: Test branch filtering performance")
print("\nBenchmarked methods:")
print("- update_repository_tree_with_branch_filter")
print("- _repo_has_matching_branches")
print("- _build_folder_structure")
print("- load_branches_if_needed")
print("- load_branches")
print("\n💡 Tip: Look for these patterns in console output:")
print("🚀 BENCHMARK: Method execution times")
print("🔍 Repository filtering details")
print("⚠️ Slow operations (>100ms)")
print("📊 Performance summaries")
# Start the application
app.root.mainloop()
if __name__ == "__main__":
main()