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

Method __init__

deps/v8/tools/run_perf.py:909–931  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

907
908class DesktopPlatform(Platform):
909 def __init__(self, args):
910 super(DesktopPlatform, self).__init__(args)
911 self.command_prefix = []
912
913 # Setup command class to OS specific version.
914 command.setup(utils.GuessOS(), args.device)
915
916 if args.prioritize or args.affinitize is not None:
917 self.command_prefix = ['schedtool']
918 if args.prioritize:
919 self.command_prefix += ['-n', '-20']
920 if args.affinitize is not None:
921 # schedtool expects a bit pattern when setting affinity, where each
922 # bit set to '1' corresponds to a core where the process may run on.
923 # First bit corresponds to CPU 0. Since the 'affinitize' parameter is
924 # a core number, we need to map to said bit pattern.
925 cpu = int(args.affinitize)
926 core = 1 << cpu
927 self.command_prefix += ['-a', ('0x%x' % core)]
928 self.command_prefix += ['-e']
929
930 if args.checked_warmup:
931 self.warmup_manager = CachedWarmupManager()
932
933 def PreExecution(self):
934 pass

Callers

nothing calls this directly

Calls 4

intFunction · 0.85
CachedWarmupManagerClass · 0.85
__init__Method · 0.45
setupMethod · 0.45

Tested by

no test coverage detected