Unverified Commit 89d94e1c authored by juga's avatar juga Committed by GitHub
Browse files

Merge pull request #251 from juga0/ticket27135_store_obs_bw

Ticket27135 store obs bw
parents aea806bf e1e6f54f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
  - Remove obsolete ``sbws init`` from `DEPLOY`.
  - Point to config documentation.
  - Add, unify and reuse terms in `glossary`.
- refactor v3bwfile (#27386): move scaling method inside class

## [0.7.0] - 2018-08-09

+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ def main(args, conf):
        log.warning('No recent results, so not generating anything. (Have you '
                    'ran sbws scanner recently?)')
        return
    bw_file = V3BWFile.from_arg_results(args, conf, results)
    state_fpath = conf.getpath('paths', 'state_fname')
    bw_file = V3BWFile.from_results(results, state_fpath, args.scale_constant)
    output = args.output or \
        conf.getpath('paths', 'v3bw_fname').format(now_fname())
    bw_file.write(output)
+228 −182

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -48,9 +48,9 @@ class State:
        self._state = self._read()

    def _read(self):
        with FileLock(self._fname):
        if not os.path.exists(self._fname):
            return {}
        with FileLock(self._fname):
            with open(self._fname, 'rt') as fd:
                return json.load(fd)

+3 −0
Original line number Diff line number Diff line
import pytest

from sbws.core.scanner import measure_relay
from sbws.lib.resultdump import ResultSuccess
import logging
@@ -42,6 +44,7 @@ def test_measure_relay_with_maxadvertisedbandwidth(
    assert result.relay_average_bandwidth == one_mbyte


@pytest.mark.skip(reason="temporally disabled")
def test_measure_relay_with_relaybandwidthrate(
        persistent_launch_tor, args, conf, dests, cb, rl):
    relay = [r for r in rl.relays
Loading