How jojo165556/speedup-lab works
This repository is a Python performance-analysis study: it runs a mixed CPU/I/O workload sequentially and with thread or process pools, profiles the workload, measures speedup, and compares results with Amdahl’s law. Its main workflow runs a reference execution, runs parallel variants, records measurements, then validates output integrity and plots theoretical versus observed speedup. The graph also includes the GIL demo and line-level profiling. Edges reflect shown calls and file reads/writes; the README documents capabilities whose implementation details are not otherwise shown.
Main entry points: 01_sequentiel.py Sequential Reference · common.py CPU and I/O Tasks · analyser_profilage.py Macro Profiling · 04_mesures.py Worker Benchmarks
Components 16
Workload
- CPU and I/O Tasks
common.py
Execution
- Sequential Reference
01_sequentiel.py - Parallel Variants
03_paralleliser.py - GIL Demonstration
05_demo_gil.py
Performance Analysis
- Line Profiling
02_profilage.py - Timing Protocol
mesure.py - Macro Profiling
analyser_profilage.py - Worker Benchmarks
04_mesures.py - Amdahl Analysis
analyser_profilage.py
Results and Validation
- Speedup Plot
06_amdahl.py - Integrity Check
verifier_recette.py - Reference Results
resultats_reference.json - Parallel Results
resultats_parallele.json - Worker Measurements
mesures.csv - Amdahl Parameters
donnees_amdahl.json
Other components
- User
Connections 26
- User → Sequential Reference: runs reference
README.md - User → Parallel Variants: runs variants
README.md - User → Line Profiling: profiles lines
README.md - User → Macro Profiling: profiles workload
README.md - User → Worker Benchmarks: measures workers
README.md - User → GIL Demonstration: compares execution
README.md - User → Speedup Plot: generates plot
README.md - User → Integrity Check: checks integrity
README.md - Sequential Reference → CPU and I/O Tasks: processes elements
01_sequentiel.py - Sequential Reference → Timing Protocol: measures optionally
01_sequentiel.py - Sequential Reference → Reference Results: writes reference
01_sequentiel.py - Parallel Variants → CPU and I/O Tasks: dispatches tasks
03_paralleliser.py - Parallel Variants → Parallel Results: writes composite
03_paralleliser.py - GIL Demonstration → CPU and I/O Tasks: runs CPU task
05_demo_gil.py - Macro Profiling → Sequential Reference: profiles execution
analyser_profilage.py - Macro Profiling → CPU and I/O Tasks: times task types
analyser_profilage.py - Macro Profiling → Amdahl Analysis: calculates fraction
analyser_profilage.py - Amdahl Analysis → Amdahl Parameters: writes parameters
analyser_profilage.py - Worker Benchmarks → Parallel Variants: benchmarks variants
04_mesures.py - Worker Benchmarks → Timing Protocol: repeats timing
04_mesures.py - Worker Benchmarks → Worker Measurements: writes measurements
04_mesures.py - Speedup Plot → Amdahl Parameters: reads parameters
06_amdahl.py - Speedup Plot → Worker Measurements: reads measurements
06_amdahl.py - Integrity Check → Reference Results: reads reference
verifier_recette.py - Integrity Check → Parallel Results: reads parallel output
verifier_recette.py - Line Profiling → CPU and I/O Tasks: profiles equivalents
02_profilage.py