pybench #2

  • By hopem
  • Latest version (#2)
  • precise
  • Stable
  • Edge

Description

http://svn.python.org/projects/python/trunk/Tools/pybench/README


Overview

http://svn.python.org/projects/python/trunk/Tools/pybench/README

This charm will create a pybench runner upstart service which will execute
pybench using settings provided by the user as defined in config.yaml

The charm and the upstart service will execute in an asynchrnous manner. If
the charm config is updated while the upstart service is busy running a
batch of tests, it will pick upo the modified config once complete i.e. it
will only notice the latest changes.

Deployment

# Bootstrap the juju environment. This is required before any other
# operation can be performed.

    juju bootstrap

# Check that the environment has been bootstrapped successfully.

    juju status

        machines:
          0:
            agent-state: running
            dns-name: <bootstrap-instance-ip-address>
            instance-id: <bootstrap-instance-id>
            instance-state: running

# Now deploy the service

    juju deploy pybench

# Check the status

    juju status

    machines:
      0:
        agent-state: running
        dns-name: localhost
        instance-id: local
        instance-state: running
    services:
      pybench:
        charm: local:precise/pybench-1
        relations: {}
        units:
          pybench/0:
            agent-state: started
            machine: 0
            public-address: 10.0.3.139

# Start the tests using a config file (pybench_config.yaml) as follows:

    cat << __EOF__ > pybench_config.yaml
    pybench:
       runs: 100
       rounds: 1
    __EOF__

    juju set pybench --config=pybench_config.yaml

Troubleshooting

* Check that the pybench_runner upstart service is up and running:

    sudo service pybench_runner status

* Check the pybench_runner logs:

    tail -F /var/log/juju/pybench_runner.log

* Check what settings are currently applie in the service config:

    juju get pybench

Configuration

runs
(int) this defines how many instances of pybench to run. Each | instance will produce its own set of results.
with_sc
(boolean) use default sys check interval
test_filter
(string) run only tests with names matching test_filter
calibration_runs
(int) sets the number of calibration runs
debug_enabled
(boolean) enable debugging
verbose_mode
(boolean) verbose output (not recommended)
with_gc
(boolean) enable garbage collection
timer
(string) use given timer module (default is time.time). Other | options include time.clock and systimes.processtime
hide_noise
(boolean) hide noise in comparisons
rounds
(int) this defines how many test rounds will be executed. Note | that this is within a single pybench run, if you want | multiple pybench runs, you need to set the 'runs' setting.
warp_factor
(int)