cloudflare / cloudflare/bbperf

ERR: Module Not Supported

Open
#1 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15
Forks
4
PR merge metrics
No merged PRs in 30d

Description

```python
#!/usr/bin/python3 -u

# Copyright (c) 2024 Cloudflare, Inc.
# Licensed under the Apache 2.0 license found in the LICENSE file or at https://www.apache.org/licenses/LICENSE-2.0

import argparse

from . import client
from . import server
from . import util
from . import const

def client_mainline(args):
print("Running in client mode with args:", args)
def server_mainline(args):
print("Running in server mode with args:", args)
# Main entry point for the bbperf tool.
def validate_args(args):
# Add validation logic as needed
pass
SERVER_PORT = 5301
DURATION_SEC = 10 # Default duration for the test
# Main entry point for the bbperf tool.

def mainline():
```

![Image](https://github.com/user-attachments/assets/b29b61c4-a919-4f8a-9928-115ec259217d)

![Image](https://github.com/user-attachments/assets/7ecf6e47-5e15-4675-ab9a-c2842e8aae8b)

![Image](https://github.com/user-attachments/assets/571e2b28-89a5-4d14-af49-43003c603a5a)

```python
# ...

if received_str != const.START_MSG:
raise Exception("ERROR: failed to receive start message")

if self.args.verbosity:
print("received start message")

def recv_a_c_block(self):
start_bytes = b' a '
end_bytes = b' c '

# blocking
substr_idx = self.recv_into_buffer_until_substr_found(end_bytes)

received_bytes = self.read_buffer[ 0 : substr_idx + 3 ]
self.read_buffer = self.read_buffer[ substr_idx + 3 : ]

if not (received_bytes.startswith(start_bytes) and received_bytes.endswith(end_bytes)):
raise Exception("recv_a_c_block failed")

return received_bytes
```

![Image](https://github.com/user-attachments/assets/1a709c43-2262-4f25-9051-8f09394fe074)

![Image](https://github.com/user-attachments/assets/036fd559-b853-4b10-b5c5-df8afecd855f)

# Generated from apache-maven/XenServer/xen_sourc/Cloudflare/Conda-z4xk3r07h/Jupyter-workspace/absl/capirca/bbperf.py

![Image](https://github.com/user-attachments/assets/098453f7-50b6-407e-b4ec-f2aa02d2d289)

![Image](https://github.com/user-attachments/assets/ff87856c-5767-4e7d-b632-dde2d553f97a)

![Image](https://github.com/user-attachments/assets/99c108e5-4cba-4bd8-93f6-43ed9043038c)

And no, I do not have an API key.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.