File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ def test_reservoir_lithostatic_pressure(self):
3535 self .assertEqual ('megapascal' , p .units )
3636
3737 def test_gringarten_stehfest_precision (self ):
38+ def _log (msg ) -> None :
39+ print (f'[DEBUG][test_gringarten_stehfest_precision] { msg } ' )
40+
3841 def _get_result (gringarten_stehfest_precision : int ) -> GeophiresXResult :
3942 return GeophiresXClient (enable_caching = False ).get_geophires_result (
4043 ImmutableGeophiresInputParameters (
@@ -53,11 +56,13 @@ def calc_time(r: GeophiresXResult) -> float:
5356 calc_time_15_sec = calc_time (result_15 )
5457 calc_time_8_sec = calc_time (result_8 )
5558
56- msg = f'calc_time_15_sec={ calc_time_15_sec } , calc_time_8_sec={ calc_time_8_sec } '
57- print (f'[DEBUG] { msg } ' )
59+ _log (f'calc_time_15_sec={ calc_time_15_sec } , calc_time_8_sec={ calc_time_8_sec } ' )
5860
5961 self .assertLess (calc_time_8_sec , calc_time_15_sec )
6062
63+ speedup_pct = ((calc_time_15_sec - calc_time_8_sec ) / calc_time_15_sec ) * 100
64+ _log (f'Speedup: { speedup_pct :.2f} %' )
65+
6166 # noinspection PyMethodMayBeStatic
6267 def _new_model (self , input_file = None ) -> Model :
6368 stash_cwd = Path .cwd ()
You can’t perform that action at this time.
0 commit comments