SWIFTSIM / pipeline

Pipeline for rapidly analysing SWIFT simulation outputs, using swiftsimio and velociraptor-python
Other
1 stars 4 forks source link

Add script runtime statistics to debug mode #22

Closed EvgeniiChaikin closed 3 years ago

EvgeniiChaikin commented 3 years ago

Add script runtime statistics to debug mode

Comes in handy when the pipeline is slow and we want to identify the bottleneck, and when we add new scripts and want to see how fast/optimised they are

Example of pipeline output when run in the debug mode:

Script Run Time Statistics: 

Script name                               Run time (s)        Fraction  
------------------------------------------------------------------------
density_temperature.py                    5.2196              0.018028  
density_temperature_sf_fraction.py        5.1238              0.017697  
density_temperature_metals.py             5.6199              0.019410  
density_temperature_dust.py               7.0884              0.024482  
density_temperature_dust_to_metals.py     6.6720              0.023044  
density_temperature_dust2metal.py         7.2742              0.025124  
density_internal_energy.py                4.9934              0.017246  
density_pressure.py                       4.9353              0.017046  
star_formation_history.py                 17.5773             0.060709  
stellar_mass_evolution.py                 5.3715              0.018552  
HI_mass_evolution.py                      4.8354              0.016701  
H2_mass_evolution.py                      5.2213              0.018033  
metallicity_distribution.py               4.8278              0.016674  
birth_density_distribution.py             4.3921              0.015170  
birth_density_metallicity.py              4.3887              0.015158  
birth_density_redshift.py                 4.4122              0.015239  
birth_metallicity_redshift.py             4.5863              0.015840  
last_SNII_density_distribution.py         4.5827              0.015828  
gas_metallicity_evolution.py              4.8631              0.016796  
star_metallicity_evolution.py             4.9212              0.016997  
bh_metallicity_evolution.py               4.5153              0.015595  
bh_accretion_evolution.py                 4.9596              0.017130  
bh_mass_evolution.py                      4.8666              0.016808  
bh_masses.py                              4.5109              0.015580  
gas_masses.py                             4.2150              0.014558  
gas_smoothing_lengths.py                  4.5816              0.015824  
number_of_agn_thermal_injections.py       4.2439              0.014658  
max_temperatures.py                       4.5516              0.015720  
max_temperature_redshift.py               4.8899              0.016889  
particle_updates_step_cost.py             20.4230             0.070537  
wallclock_simulation_time.py              20.6201             0.071218  
wallclock_number_of_steps.py              20.6811             0.071429  
simulation_time_number_of_steps.py        20.6841             0.071439  
wallclock_timebin_hist.py                 20.7742             0.071751  
density_temperature_species.py            7.3032              0.025224  
density_species_interp.py                 13.4793             0.046555  
last_SNII_kick_velocity_distribution.py   3.6646              0.012657  
max_SNII_kick_velocities.py               3.6640              0.012655  
Total Runtime                             289.5341            1.000000