Comments (5)
The incremental measurement approach is more likely to reflect the real bandwidth on a connection. Measuring the start and end of the test payload download will be affected by the latency in establishing a circuit and connection. We should decide which of these values is more relevant for the Tor bandwidth auths.
from bwscanner.
The measurement code is now just using the fetch start and finish time and does the naive calculation to determine the bandwidth. This time will include the extra time needed to establish the circuit. It would be useful to have an event which also logs the circuit establishment time.
This would allow us to analyse the measurements later and determine if the circuit creation time distorts the total bandwidth values.
from bwscanner.
We have both a class CircuitEventListener(CircuitListenerMixin, StreamListenerMixin)
and a class StreamBandwidthListener(CircuitListenerMixin, StreamListenerMixin),
but it looks like they need to be attached to the txtorcon state like self.tor.add_circuit_listener(self.circuit_event_listener),
and that's only happening in test/test_listener.py.
Is that old code, or what? Seems easy to attach the circuit listener and read out the times of the circuit build events? I might be missing something.
from bwscanner.
I was going to add a "listener" style API to txtorcon 1.0. Would such an API be useful in a case like this? See meejah/txtorcon#168
Anyway, no matter the method, you can indeed get timestamps for all aspects of the circuit lifetime (each time it's extended, when it becomes BUILT
and thus ready to take a stream, etc). See https://txtorcon.readthedocs.io/en/latest/txtorcon-state.html#circuit for meanings of the .state
attribute. The circuit events are emitted when this is updated, approximately (except: there are several EXTENDED events, after each of which .path
will be one Router
instance longer).
from bwscanner.
@joelanders Yes, your right. Those circuit and stream bandwidth listeners are not currently being used. We had trouble testing this in #20 but its potentially useful so we didn't want to purge it just yet. It would be useful if you could figure out how to test that code based on #20.
from bwscanner.
Related Issues (20)
- Run chutney using tools/test-network.sh instead of ./chutney start networks/basic-025 HOT 1
- Connect to a running tor only for chutney tests
- NOTE: temporally disable review on PRs HOT 1
- allow disabling file hash checking on the command line
- Check dependencies are correct when installing with python setup.py install
- ``Download failed`` for most of the relays
- exceptions.ValueError: Did not find a suitable exit relay to build this circuit.
- OpenSSL Error HOT 11
- Setting DisableDebuggerAttachment too late HOT 1
- Unhandled Error on disconnect
- __getitem__ on a NoneType
- Excessive memory usage HOT 2
- [aggregate] Missing error handling
- Remove scripts/detect_partitions.py? HOT 3
- txsocksx dependency is not compatible with Python 3 HOT 4
- test_measurement.py fails HOT 2
- Chutney create more exits than non-exits relays HOT 3
- TwoHops algorithm is different to Torflow HOT 1
- Tests fail using chutney bwscanner configuration HOT 3
- Simplify code using txtorcon new features HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bwscanner.