File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import random
88from dataclasses import dataclass , field
99from pathlib import Path
10- from time import time
1110from typing import TYPE_CHECKING , cast
1211
1312import pytest
@@ -297,12 +296,9 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus):
297296 plugin = get_plugin (session .config )
298297 if plugin .is_codspeed_enabled :
299298 plugin .instrument .report (session )
300- if plugin .profile_folder :
301- result_path = plugin .profile_folder / "results" / f"{ os .getpid ()} .json"
302- else :
303- result_path = (
304- session .config .rootpath / f".codspeed/results_{ time () * 1000 :.0f} .json"
305- )
299+ if plugin .profile_folder is None :
300+ return
301+ result_path = plugin .profile_folder / "results" / f"{ os .getpid ()} .json"
306302 data = {** get_environment_metadata (), ** plugin .instrument .get_result_dict ()}
307303 result_path .parent .mkdir (parents = True , exist_ok = True )
308304 result_path .write_text (json .dumps (data , indent = 2 ))
You can’t perform that action at this time.
0 commit comments