Skip to content

Commit

Permalink
feat(explorer): automatically create patch files
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasrothenberger committed Oct 23, 2024
1 parent 95a4d1b commit c9909d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions discopop_explorer/discopop_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import logging
import os
import shutil
import subprocess
import sys
import time
from dataclasses import dataclass
Expand All @@ -30,6 +31,7 @@

from discopop_library.LineMapping.initialize import initialize_line_mapping
from discopop_library.LineMapping.delete import delete_line_mapping
from discopop_library.PatchGenerator.PatchGeneratorArguments import PatchGeneratorArguments
from discopop_library.PathManagement.PathManagement import get_path, load_file_mapping
from discopop_library.discopop_optimizer.Microbench.ExtrapInterpolatedMicrobench import (
ExtrapInterpolatedMicrobench,
Expand Down Expand Up @@ -270,6 +272,12 @@ def run(arguments: ExplorerArguments) -> None:

print("Time taken for pattern detection: {0}".format(end - start))

# create applicable patch files from the found suggestions
logger.info("executing discopop_patch_generator")
out = subprocess.check_output(["discopop_patch_generator"], cwd=arguments.project_path).decode("utf-8")
logger.debug("\t Out:\n" + out)
logger.info("\tDone.")

# demonstration of Microbenchmark possibilities
if arguments.microbench_file is not None:
microbench_file = get_path(
Expand Down

0 comments on commit c9909d4

Please sign in to comment.