🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

github.com/ease-lab/vSwarm/benchmarks/aes

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ease-lab/vSwarm/benchmarks/aes

Source
Go Modules
Version
v0.0.0-20230310181402-cb6cdf50fe63
Version published
Created
Source

AES benchmark

The AES benchmark use the AES128 algorithm to encrypt a certain message string. As we are using the aes gRPC protocol for this benchmark the message will be the plaintext_message variable. If you do not specify a plaintext_message a default plaintext_message is taken. You can change the default plaintext_message with the argument default-plaintext.

AES requires a secret key for encryption. The functions use a default key but you can specify your own by passing it with the key argument to the function. See source code for more details.

The same functionality is implemented in different runtimes, namely Python, NodeJS and golang.

Running this benchmark locally (using docker)

The detailed and general description how to run benchmarks local you can find here. The following steps show it on the aes-python function.

  • Build or pull the function images using make all-images or make pull.

Invoke once

  • Start the function with docker-compose
    docker-compose -f yamls/docker-compose/dc-aes-python.yaml up
    
  • In a new terminal, invoke the interface function with grpcurl.
    ./tools/bin/grpcurl -plaintext localhost:50000 helloworld.Greeter.SayHello
    

Invoke multiple times

  • Run the invoker
    # build the invoker binary
    cd ../../tools/invoker
    make invoker
    
    # Specify the hostname through "endpoints.json"
    echo '[ { "hostname": "localhost" } ]' > endpoints.json
    
    # Start the invoker with a chosen RPS rate and time
    ./invoker -port 50000 -dbg -time 10 -rps 1
    

Running this benchmark (using knative)

The detailed and general description on how to run benchmarks on knative clusters you can find here. The following steps show it on the aes-python function.

  • Build or pull the function images using make all-images or make pull.
  • Start the function with knative
    kn service apply -f ./yamls/knative/kn-aes-python.yaml
    
  • Note the URL provided in the output. The part without the http:// we'll call $URL. Replace any instance of $URL in the code below with it.

Invoke once

  • In a new terminal, invoke the interface function with test-client.
    ./test-client --addr $URL:80 --name "Example text for AES"
    

Invoke multiple times

  • Run the invoker
    # build the invoker binary
    cd ../../tools/invoker
    make invoker
    
    # Specify the hostname through "endpoints.json"
    echo '[ { "hostname": "$URL" } ]' > endpoints.json
    
    # Start the invoker with a chosen RPS rate and time
    ./invoker -port 80 -dbg -time 10 -rps 1
    

Tracing

This Benchmark supports distributed tracing for all runtimes. For the general use see vSwarm docs for tracing locally and with knative.

FAQs

Package last updated on 10 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts