s2n-netbench 0.1.1

An efficiency, performance, and correctness analysis tool for transport protocols.
Documentation
---
source: netbench/src/scenario/builder/tests.rs
expression: "scenario(|scenario|\n        {\n            let server = scenario.create_server();\n            scenario.create_client(|client|\n                    {\n                        client.connect_to(server,\n                            |conn|\n                                {\n                                    conn.open_send_stream(|local|\n                                            {\n                                                local.set_send_rate(1024.bytes() / 50.millis());\n                                                local.send(1.megabytes());\n                                            },\n                                        |peer|\n                                            {\n                                                peer.set_receive_rate(1024.bytes() / 50.millis());\n                                                peer.receive(1.megabytes());\n                                            });\n                                });\n                    });\n        })"
---
{
  "id": "",
  "clients": [
    {
      "scenario": [
        {
          "connect": {
            "server_id": 0,
            "server_connection_id": 0,
            "client_connection_id": 0
          }
        }
      ],
      "connections": [
        {
          "ops": [
            {
              "open_send_stream": {
                "stream_id": 0
              }
            },
            {
              "send_rate": {
                "stream_id": 0,
                "bytes": 1024,
                "period_ms": 50
              }
            },
            {
              "send": {
                "stream_id": 0,
                "bytes": 1000000
              }
            },
            {
              "send_finish": {
                "stream_id": 0
              }
            }
          ]
        }
      ],
      "certificate_authorities": [
        0
      ]
    }
  ],
  "servers": [
    {
      "connections": [
        {
          "peer_streams": [
            [
              {
                "receive_rate": {
                  "stream_id": 0,
                  "bytes": 1024,
                  "period_ms": 50
                }
              },
              {
                "receive": {
                  "stream_id": 0,
                  "bytes": 1000000
                }
              },
              {
                "receive_finish": {
                  "stream_id": 0
                }
              }
            ]
          ]
        }
      ],
      "private_key": 1,
      "certificate": 2,
      "certificate_authority": 0
    }
  ]
}