now using max frequency! new version

This commit is contained in:
Julian Hammer
2020-01-10 15:26:58 +01:00
parent c739acab7e
commit 6f62086187
3 changed files with 31 additions and 3 deletions

View File

@@ -0,0 +1 @@
__version__ = '0.1.4'

View File

@@ -34,7 +34,7 @@ def uniquify(l):
class Benchmark:
def __init__(self, frequency=None):
self.frequency = frequency or psutil.cpu_freq().current * 1e6
self.frequency = frequency or psutil.cpu_freq().max * 1e6
def __repr__(self):
return '{}({})'.format(

View File

@@ -1,12 +1,39 @@
import io
import os
import re
from codecs import open # To use a consistent encoding
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open('README.rst') as f:
# Stolen from pip
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
) as fp:
return fp.read()
# Stolen from pip
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# Get the long description from the relevant file
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='asmbench',
version='0.1.3',
version=find_version('asmbench', '__init__.py'),
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
url='https://github.com/RRZE-HPC/asmbench',
license='AGPLv3',