Git Product home page Git Product logo

Comments (5)

DonnchaC avatar DonnchaC commented on September 2, 2024

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.

DonnchaC avatar DonnchaC commented on September 2, 2024

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.

joelanders avatar joelanders commented on September 2, 2024

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.

meejah avatar meejah commented on September 2, 2024

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.

DonnchaC avatar DonnchaC commented on September 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.