-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cursorrules
More file actions
72 lines (54 loc) · 2.55 KB
/
.cursorrules
File metadata and controls
72 lines (54 loc) · 2.55 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Python Performance Testing Repository Rules
## Project Overview
This repository is for testing Python performance between versions 3.13, 3.14, and 3.14 threadfree. Focus on creating comprehensive benchmarks and performance analysis tools.
## Code Style & Standards
- Follow PEP 8 Python style guidelines
- Use type hints for all function parameters and return values
- Write comprehensive docstrings for all functions and classes
- Use meaningful variable and function names
- Prefer f-strings over .format() or % formatting
- Use pathlib for file path operations
- Handle exceptions explicitly with try/except blocks
## Performance Testing Guidelines
- Create separate test modules for each Python version comparison
- Use appropriate benchmarking libraries (timeit, cProfile, memory_profiler)
- Include both CPU-bound and I/O-bound performance tests
- Test various data structures and algorithms
- Measure execution time, memory usage, and CPU utilization
- Generate detailed performance reports with visualizations
## File Organization
- Create separate directories for each Python version's tests
- Use descriptive filenames that indicate the test purpose
- Group related tests in modules
- Create a main runner script to execute all benchmarks
- Include configuration files for test parameters
## Dependencies & Environment
- Use virtual environments for each Python version
- Create requirements.txt for each version
- Document Python version requirements clearly
- Use poetry or pip-tools for dependency management
- Include environment setup scripts
## Testing & Validation
- Write unit tests for all benchmark functions
- Validate results across different Python versions
- Include statistical analysis of performance differences
- Create regression tests to detect performance changes
- Use pytest for test framework
## Documentation
- Document benchmark methodology and assumptions
- Include performance analysis and conclusions
- Create visualizations (charts, graphs) for results
- Write clear setup and execution instructions
- Document any system requirements or limitations
## Performance Considerations
- Minimize overhead in benchmark code
- Use appropriate sample sizes for statistical significance
- Account for system variability in measurements
- Include warmup runs before actual measurements
- Consider garbage collection impact on results
## Output & Reporting
- Generate structured output (JSON, CSV) for results
- Create human-readable summary reports
- Include performance comparison tables
- Generate visual charts and graphs
- Export results for further analysis