MCPcopy Index your code
hub / github.com/nodejs/node / GetCommand

Method GetCommand

deps/v8/tools/run_perf.py:589–606  ·  view source on GitHub ↗
(self, cmd_prefix, shell_dir, extra_flags=None)

Source from the content-addressed store, hash-verified

587 return self.flags + (extra_flags or []) + [self.main] + suffix
588
589 def GetCommand(self, cmd_prefix, shell_dir, extra_flags=None):
590 # TODO(machenbach): This requires +.exe if run on windows.
591 extra_flags = extra_flags or []
592 if self.binary != 'd8' and '--prof' in extra_flags:
593 logging.info('Profiler supported only on a benchmark run with d8')
594
595 if self.process_size:
596 cmd_prefix = ['/usr/bin/time', '--format=MaxMemory: %MKB'] + cmd_prefix
597 if self.binary.endswith('.py'):
598 # Copy cmd_prefix instead of update (+=).
599 cmd_prefix = cmd_prefix + [sys.executable]
600
601 return command.Command(
602 cmd_prefix=cmd_prefix,
603 shell=os.path.join(shell_dir, self.binary),
604 args=self.GetCommandFlags(extra_flags=extra_flags),
605 timeout=self.timeout or 60,
606 handle_sigterm=True)
607
608 def ProcessOutput(self, output, result_tracker, count):
609 """Processes test run output and updates result tracker.

Callers 1

_RunMethod · 0.80

Calls 4

GetCommandFlagsMethod · 0.95
infoMethod · 0.80
CommandMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected