Пример #1
0
  description: Runs Glibc Microbenchmark.
  vm_groups:
    default:
      vm_spec: *default_dual_core
      vm_count: null
      os_type: ubuntu1804
"""

glibc_default_benchset = [
    'bench-math', 'bench-pthread', 'bench-string', 'string-benchset',
    'wcsmbs-benchset', 'stdlib-benchset', 'stdio-common-benchset',
    'math-benchset', 'malloc-thread'
]
flags.DEFINE_multi_enum(
    'glibc_benchset', glibc_default_benchset, glibc_default_benchset,
    'By default, it will run the whole set of benchmarks. To run only a subset '
    'of benchmarks, one may set "glibc_benchset = bench-math bench-pthread" by '
    'using the flag on the command line multiple times.')

GLIBC_BENCH = ['bench-math', 'bench-pthread', 'bench-string']
GLIBC_BENCH_MALLOC = ['malloc-thread']
# TODO(yanfeiren): Parse other *-benchset benchmarks.
GLIBC_MATH_BENCHSET = ['math-benchset']

RESULTS_DIR = '%s/glibc/glibc-build/benchtests' % linux_packages.INSTALL_DIR

_GCC_VERSION_RE = re.compile(r'gcc\ version\ (.*?)\ ')


def GetConfig(user_config):
    return configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME)
Пример #2
0
from perfkitbenchmarker import providers
from perfkitbenchmarker import resource
from perfkitbenchmarker import vm_util
from perfkitbenchmarker.providers.aws import aws_placement_group
from perfkitbenchmarker.providers.aws import aws_vpc_endpoint
from perfkitbenchmarker.providers.aws import util

flags.DEFINE_string('aws_vpc', None,
                    'The static AWS VPC id to use. Default creates a new one')
flags.DEFINE_string(
    'aws_subnet', None,
    'The static AWS subnet id to use.  Default creates a new one')
flags.DEFINE_bool('aws_efa', False, 'Whether to use an Elastic Fiber Adapter.')
flags.DEFINE_string('aws_efa_version', '1.8.3',
                    'Version of AWS EFA to use (must also pass in --aws_efa).')
flags.DEFINE_multi_enum('aws_endpoint', [], ['s3'],
                        'List of AWS endpoints to create')

FLAGS = flags.FLAGS


REGION = 'region'
ZONE = 'zone'


class AwsFirewall(network.BaseFirewall):
  """An object representing the AWS Firewall."""

  CLOUD = providers.AWS

  def __init__(self):
    self.firewall_set = set()
from perfkitbenchmarker import flags
from perfkitbenchmarker import vm_util
from perfkitbenchmarker.linux_packages import ch_block_storage

BENCHMARK_NAME = 'ch_block_storage'
BENCHMARK_CONFIG = """
ch_block_storage:
  description: Runs cloudharmony block storage tests.
  vm_groups:
    default:
      vm_spec: *default_single_core
      disk_spec: *default_500_gb
"""

flags.DEFINE_multi_enum(
    'ch_block_tests', ['iops'],
    ['iops', 'throughput', 'latency', 'wsat', 'hir'],
    'A list of tests supported by CloudHarmony block storage benchmark.')

FLAGS = flags.FLAGS


def GetConfig(user_config):
  config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME)
  disk_spec = config['vm_groups']['default']['disk_spec']
  # Use raw device
  # TODO(yuyanting): Support filesystem?
  for cloud in disk_spec:
    disk_spec[cloud]['mount_point'] = None
  return config