deb-python-pint/bench/bench_base.yaml
2014-05-06 22:21:51 -03:00

43 lines
883 B
YAML

- name: importing
stmt: import pint
- name: empty registry
setup: import pint
stmt: ureg = pint.UnitRegistry(None)
- name: default registry
setup: import pint
stmt: ureg = pint.UnitRegistry()
- name: finding meter
setup: |
import pint
ureg = pint.UnitRegistry()
stmts:
- name: (attr)
stmt: q = ureg.meter
- name: (item)
stmt: q = ureg['meter']
- name: base units
setup: |
import pint
ureg = pint.UnitRegistry()
stmts:
- name: meter
stmt: ureg.get_base_units('meter')
- name: yard
stmt: ureg.get_base_units('yard')
- name: meter / second
stmt: ureg.get_base_units('meter / second')
- name: yard / minute
stmt: ureg.get_base_units('yard / minute')
- name: build cache
setup: |
import pint
ureg = pint.UnitRegistry()
stmt: ureg._build_cache()