Skip to content

Can not run with --meter perf #6

Description

@llbit

I tried to run with the --meter perf option but that generated the following error:

['perf stat -r 1 -x, -o _perf.tmp --append', 'Rscript', '--vanilla', '/usr/local/.../r_harness.R', 'TRUE', 'FALSE', '2', 'crt.R', '']
Execution failed:  [Errno 2] No such file or directory
[Errno 2] No such file or directory

The root cause seems to be how the subprocess.call command is generated:

        warmup_cmd = [perf_cmd, rcmd_args, harness, harness_args,
                      use_system_time, str(warmup_rep), source, rargs]

As you can see in the console log at the top, the perf stat... part is a single list element. I could fix the problem by splitting the perf_cmd into a list and prepending it to the command list:

        warmup_cmd = perf_cmd.split() + [rcmd_args, harness, harness_args,
                      use_system_time, str(warmup_rep), source, rargs]

I am using Python 2.7.6.

I'll send a patch for this and you can accept it if this is the correct way to handle the system call.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions