Comments (2)
Can you explain where the non-determinism comes from?
from quic-interop-runner.
Hello Marten, _client_server_pairs
is an ordered list of client, server tuples. That ordered list loses its order when converted to a set()
on these two lines https://github.com/quic-interop/quic-interop-runner/blob/master/interop.py#L287C57-L288. set()
is unordered as noted in the documentation https://docs.python.org/3/tutorial/datastructures.html#sets. Those unordered clients
, servers
are then written out to the "servers" and "clients" JSON arrays in the result.json. Then a few lines later in that _export_results
method, we iterate over an ordered list of tuples of clients and servers https://github.com/quic-interop/quic-interop-runner/blob/master/interop.py#L309 to write out the "results" attribute in the json content. As a result, this iteration returns a different order of clients and servers as compared to the clients
, servers
variables constructed out of the set()
. To explain this more clearly, consider this example in the python interpreter:
>>> client_server_pair = []
>>> client_list = []
>>> client_list.append("quic-go")
>>> server_list = []
>>> server_list.append("ngtcp2")
>>> server_list.append("quic-go")
>>> server_list.append("nginx")
>>> server_list.append("neqo")
>>> server_list.append("haproxy")
>>> server_list.append("quiche")
>>> client_list # print the client list
['quic-go']
>>> server_list # print the ordered server list
['ngtcp2', 'quic-go', 'nginx', 'neqo', 'haproxy', 'quiche']
>>> client_server_pairs = []
>>> for client in client_list:
... for server in server_list:
... client_server_pairs.append((client, server)) # form a tuple of client, server and add it to a list
...
>>> client_server_pairs # print the ordered list of tuples
[('quic-go', 'ngtcp2'), ('quic-go', 'quic-go'), ('quic-go', 'nginx'), ('quic-go', 'neqo'), ('quic-go', 'haproxy'), ('quic-go', 'quiche')]
>>> clients = list(set(client for client, _ in client_server_pairs)) # convert to a set()
>>> clients # print the clients
['quic-go']
>>> servers = list(set(server for _, server in client_server_pairs)) # convert to a set()
>>> servers # print the servers and notice the original order is lost
['nginx', 'quiche', 'quic-go', 'ngtcp2', 'neqo', 'haproxy']
from quic-interop-runner.
Related Issues (20)
- Q/A: Please share commands used internally HOT 4
- docker pulling s2n-quic regularly fails HOT 6
- consider removing quant HOT 3
- move repo to a separate GitHub org HOT 4
- Need to update Wireshark/TShark cache version HOT 2
- key update test seems broken
- docker pull for nginx is failing the build: AWS container registry HOT 2
- Drop implementations that haven't been updated HOT 5
- xquic is taking >8h to run tests
- Add option to generate Markdown `prettytable`s
- ECN test shouldn't be counting marks from packets that cannot be decrypted HOT 2
- Everyone fails the amplification test at the moment? HOT 1
- "This event loop is already running" HOT 2
- What role does the VERSION environment variable play in the tests? HOT 6
- Automatically mark as unsupported HOT 5
- feature request: add openssl quic (openssl 3.2+) HOT 1
- EIO on sendmsg with GSO HOT 2
- zerortt test counts 1-RTT traffic from first connection HOT 2
- No pcaps when platforms don't match
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 quic-interop-runner.