Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions codeflash/code_utils/instrument_existing_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

from codeflash.models.models import CodePosition

_MODE_TO_DECORATOR = {
TestingMode.BEHAVIOR: "codeflash_behavior_async",
TestingMode.CONCURRENCY: "codeflash_concurrency_async",
}


@dataclass(frozen=True)
class FunctionCallNodeArguments:
Expand Down Expand Up @@ -1667,11 +1672,7 @@ async def async_wrapper(*args, **kwargs):


def get_decorator_name_for_mode(mode: TestingMode) -> str:
if mode == TestingMode.BEHAVIOR:
return "codeflash_behavior_async"
if mode == TestingMode.CONCURRENCY:
return "codeflash_concurrency_async"
return "codeflash_performance_async"
return _MODE_TO_DECORATOR.get(mode, "codeflash_performance_async")


def write_async_helper_file(target_dir: Path) -> Path:
Expand Down
Loading