<commit_before># Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Runs UnixBench.

Documentation & code: http://code.google.com/p/byte-unixbench/

Unix bench is a holistic performance benchmark, measuing CPU performance,
some memory bandwidth, and disk.
"""

import logging

from perfkitbenchmarker import data
from perfkitbenchmarker import flags
from perfkitbenchmarker import regex_util
from perfkitbenchmarker import sample
from perfkitbenchmarker.packages import unixbench

FLAGS = flags.FLAGS

BENCHMARK_INFO = {'name': 'unixbench',
                  'description': 'Runs UnixBench.',
                  'scratch_disk': True,
                  'num_machines': 1}

flags.DEFINE_boolean('unixbench_all_cores', default=False,
                     help='Applies patch to UnixBench to fix limitation of '
                     '16 cores limit.')
<commit_msg>Improve Unix Bench all_cores flag help message<commit_after># Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Runs UnixBench.

Documentation & code: http://code.google.com/p/byte-unixbench/

Unix bench is a holistic performance benchmark, measuing CPU performance,
some memory bandwidth, and disk.
"""

import logging

from perfkitbenchmarker import data
from perfkitbenchmarker import flags
from perfkitbenchmarker import regex_util
from perfkitbenchmarker import sample
from perfkitbenchmarker.packages import unixbench

FLAGS = flags.FLAGS

BENCHMARK_INFO = {'name': 'unixbench',
                  'description': 'Runs UnixBench.',
                  'scratch_disk': True,
                  'num_machines': 1}

flags.DEFINE_boolean('unixbench_all_cores', default=False,
                     help='Setting this flag changes the default behavior of '
                     'Unix bench. It will now scale to the number of CPUs on '
                     'the machine vs the limit of 16 CPUs today.')

{'fraction_non_alphanumeric': 0.07154967785690064, 'fraction_numerical': 0.007460155985079688, 'mean_word_length': 3.4832826747720365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6197411', 'n_tokens_mistral': 799, 'n_tokens_neox': 752, 'n_words': 330}