File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ def _apply_config(description: dict, config: Settings) -> dict:
223
223
def compare (
224
224
reports : List [ProfileReport ],
225
225
config : Optional [Settings ] = None ,
226
+ compute : bool = True ,
226
227
) -> ProfileReport :
227
228
"""
228
229
Compare Profile reports
@@ -231,6 +232,7 @@ def compare(
231
232
reports: two reports to compare
232
233
input may either be a ProfileReport, or the summary obtained from report.get_description()
233
234
config: the settings object for the merged ProfileReport
235
+ compute: recompute the profile report using config or the left report config
234
236
235
237
"""
236
238
validate_reports (reports )
@@ -243,7 +245,7 @@ def compare(
243
245
return reports [0 ]
244
246
245
247
if config is None :
246
- _config = Settings ()
248
+ _config = reports [ 0 ]. config . copy ()
247
249
else :
248
250
_config = config .copy ()
249
251
for report in reports :
@@ -252,6 +254,8 @@ def compare(
252
254
report .config = config .copy ()
253
255
report .config .title = title
254
256
report .config .vars .timeseries .active = tsmode
257
+ if compute :
258
+ report ._description_set = None
255
259
256
260
if all (isinstance (report , ProfileReport ) for report in reports ):
257
261
# Type ignore is needed as mypy does not pick up on the type narrowing
You can’t perform that action at this time.
0 commit comments