Skip to content

Commit

Permalink
Supporting Python3.10 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
engshahrad authored Aug 15, 2023
1 parent 39b09e1 commit b69ef87
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/automated-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.10.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ Mohammad Shahrad, Jonathan Balkind, and David Wentzlaff. "[Architectural Implica

## Setting Things Up

### Set up OpenWhisk
### Set up OpenWhisk if testing locally
[You don't need this if you intend to use the *generic endpoint* mode to test remote functions.]

FaaSProfiler has been fully tested on [OpenWhisk](https://github.com/apache/openwhisk). Please make sure to set up and install [OpenWhisk](https://github.com/apache/openwhisk) before using FaaSProfiler.

**Important Note**: Some of the default [OpenWhisk configuration](https://github.com/apache/openwhisk/blob/master/ansible/group_vars/all) limits might be too restrictive for your setup. Do not forget to configure those parameters (particularly these: `invocationsPerMinute`, `concurrentInvocations`, `firesPerMinute`, and `sequenceMaxLength`).

**Note**: We plan to add support for other popular serverless platforms. Help from the community is highly appreciated.

### Configure FaaSProfiler

After cloning this repo run the one-time configuration:
After cloning this repo run the one-time configuration script:
```
bash configure.sh
```
Expand Down Expand Up @@ -87,12 +86,12 @@ The [Comparative Analyzer](./comparative_analyzer) module compares the results o

Environment/Tool | Tested Version(s)
---------------- | --------------
Python | Python 3.x
Python 3.8 (fully tested) | Python 3.10 (partially tested)
OS | Ubuntu 16.04.4 LTS, Ubuntu 20.04.1 LTS

Python Library | Latest Tested Version
---------------- | --------------
requests-futures | 1.0.0
requests-futures | 1.0.1
matplotlib | 3.3.3
numpy | 1.19.5
pandas | 1.2.0
Expand Down
16 changes: 13 additions & 3 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Installing some dependencies if needed
sudo apt-get install -y moreutils
sudo python3 -m pip install -r requirements.txt
python3.10 -m pip install -r requirements.txt

# Configure path variables used by the platform
ROOTLINE='FAAS_ROOT="'$(echo $PWD)'"'
Expand All @@ -15,5 +15,15 @@ echo $ROOTLINE | cat - invocation-scripts/monitoring.sh | sponge invocation-scri
echo $ROOTLINE | cat - monitoring/RuntimeMonitoring.sh | sponge monitoring/RuntimeMonitoring.sh

# Make local directories
mkdir logs
mkdir data_archive
if [ -d "logs" ]
then
echo "Directory logs already exists."
else
mkdir logs
fi
if [ -d "data_archive" ]
then
echo "Directory data_archive already exists."
else
mkdir data_archive
fi
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage
requests_futures
requests_futures==1.0.1
matplotlib
numpy
pandas
Expand Down
9 changes: 6 additions & 3 deletions synthetic_workload_invoker/WorkloadInvoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def HTTPInstanceGeneratorOW(action, instance_times, blocking_cli, param_file=Non
"""
if len(instance_times) == 0:
return False
session = FuturesSession(max_workers=15)
session = FuturesSession(max_workers=16)
url = base_url + action
parameters = {"blocking": blocking_cli, "result": RESULT}
authentication = (user_pass[0], user_pass[1])
Expand Down Expand Up @@ -114,7 +114,7 @@ def BinaryDataHTTPInstanceGeneratorOW(action, instance_times, blocking_cli, data
This function is used to invoke a function with binary data as input.
"""
url = base_gust_url + action
session = FuturesSession(max_workers=15)
session = FuturesSession(max_workers=16)
if len(instance_times) == 0:
return False
after_time, before_time = 0, 0
Expand Down Expand Up @@ -153,7 +153,7 @@ def HTTPInstanceGeneratorGeneric(instance_times, blocking_cli, url, data):
logger.error("Invalid URL: " + url)
return False

session = FuturesSession(max_workers=100)
session = FuturesSession(max_workers=16)
parameters = {"blocking": blocking_cli, "result": RESULT}
after_time, before_time = 0, 0

Expand Down Expand Up @@ -300,6 +300,9 @@ def main(argv):
logger.info("Test started")
for thread in threads:
thread.start()
logger.info("Waiting for invocation threads to join")
for thread in threads:
thread.join()
logger.info("Test ended")

return True
Expand Down

0 comments on commit b69ef87

Please sign in to comment.