File tree Expand file tree Collapse file tree 11 files changed +33
-4
lines changed
Expand file tree Collapse file tree 11 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ jsonschema = "==4.23.0"
2424rich = " ==13.9.4"
2525click = " >=8.2.1"
2626dacite = " ==1.9.2"
27+ line_profiler = " 5.0.0"
2728pysatl-criterion = {path = " ./pysatl_criterion" }
2829
2930[tool .poetry .group .dev .dependencies ]
Original file line number Diff line number Diff line change 1+ from line_profiler import profile
2+
13from pysatl_experiment .experiment_new .experiment_steps .experiment_steps import ExperimentSteps
24from pysatl_experiment .experiment_new .model .experiment_step .experiment_step import IExperimentStep
35
@@ -10,6 +12,7 @@ class Experiment:
1012 def __init__ (self , experiment_steps : ExperimentSteps ):
1113 self .experiment_steps = experiment_steps
1214
15+ @profile
1316 def run_experiment (self ) -> None :
1417 """
1518 Run experiment.
Original file line number Diff line number Diff line change 1+ from line_profiler import profile
2+
13from pysatl_experiment .persistence .model .random_values .random_values import IRandomValuesStorage , RandomValuesCountQuery
24
35
6+ @profile
47def get_sample_data_from_storage (
58 generator_name : str ,
69 generator_parameters : list [float ],
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22
3+ from line_profiler import profile
4+
35from pysatl_criterion .persistence .model .limit_distribution .limit_distribution import (
46 ILimitDistributionStorage ,
57 LimitDistributionModel ,
@@ -43,6 +45,7 @@ def __init__(
4345 self .data_storage = data_storage
4446 self .result_storage = result_storage
4547
48+ @profile
4649 def run (self ) -> None :
4750 """
4851 Run standard critical value execution step.
@@ -72,6 +75,7 @@ def run(self) -> None:
7275 results_statistics = results_statistics ,
7376 )
7477
78+ @profile
7579 def _save_result_to_storage (
7680 self ,
7781 experiment_id : int ,
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22
3+ from line_profiler import profile
4+
35from pysatl_criterion .statistics .goodness_of_fit import AbstractGoodnessOfFitStatistic
46from pysatl_experiment .configuration .model .alternative .alternative import Alternative
57from pysatl_experiment .experiment_new .step .execution .common .execution_step_data .execution_step_data import (
@@ -42,6 +44,7 @@ def __init__(
4244 self .result_storage = result_storage
4345 self .storage_connection = storage_connection
4446
47+ @profile
4548 def run (self ) -> None :
4649 """
4750 Run standard power execution step.
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22
3+ from line_profiler import profile
4+
35from pysatl_experiment .experiment_new .step .execution .common .execution_step_data .execution_step_data import ( # noqa: E501
46 ExecutionStepData ,
57)
@@ -43,6 +45,7 @@ def __init__(
4345 self .data_storage = data_storage
4446 self .result_storage = result_storage
4547
48+ @profile
4649 def run (self ) -> None :
4750 """
4851 Run standard time complexity execution step.
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22
3+ from line_profiler import profile
4+
35from pysatl_experiment .experiment .generator import AbstractRVSGenerator
46from pysatl_experiment .persistence .model .random_values .random_values import IRandomValuesStorage , RandomValuesModel
57
@@ -30,6 +32,7 @@ def __init__(
3032 self .step_config = step_config
3133 self .data_storage = data_storage
3234
35+ @profile
3336 def run (self ) -> None :
3437 """
3538 Run standard generation step.
@@ -39,6 +42,7 @@ def run(self) -> None:
3942 samples = self ._generate_samples (step_data )
4043 self ._save_samples_to_storage (samples , step_data .sample_size , step_data )
4144
45+ @profile
4246 def _generate_samples (self , step_data : GenerationStepData ) -> list [list [float ]]:
4347 """
4448 Generate samples.
Original file line number Diff line number Diff line change 11from pathlib import Path
22
3+ from line_profiler import profile
4+
35from pysatl_criterion .cv_calculator .cv_calculator .cv_calculator import CVCalculator
46from pysatl_criterion .persistence .model .limit_distribution .limit_distribution import (
57 ILimitDistributionStorage ,
@@ -33,6 +35,7 @@ def __init__(
3335 self .results_path = results_path
3436 self .with_chart = with_chart
3537
38+ @profile
3639 def run (self ) -> None :
3740 """
3841 Run standard critical value report building step.
Original file line number Diff line number Diff line change 11from pathlib import Path
22
3+ from line_profiler import profile
4+
35from pysatl_experiment .configuration .criteria_config .criteria_config import CriterionConfig
46from pysatl_experiment .configuration .model .alternative .alternative import Alternative
57from pysatl_experiment .configuration .model .report_mode .report_mode import ReportMode
@@ -32,6 +34,7 @@ def __init__(
3234 self .results_path = results_path
3335 self .with_chart = with_chart
3436
37+ @profile
3538 def run (self ) -> None :
3639 """
3740 Run standard power report building step.
Original file line number Diff line number Diff line change 11from pathlib import Path
22
33import numpy as np
4+ from line_profiler import profile
45
56from pysatl_experiment .configuration .criteria_config .criteria_config import CriterionConfig
67from pysatl_experiment .configuration .model .report_mode .report_mode import ReportMode
@@ -32,6 +33,7 @@ def __init__(
3233 self .results_path = results_path
3334 self .with_chart = with_chart
3435
36+ @profile
3537 def run (self ) -> None :
3638 """
3739 Run standard time complexity report building step.
You can’t perform that action at this time.
0 commit comments