Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Internship] Benchmarking remote execution #346

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

NicolasHuertas
Copy link
Collaborator

@NicolasHuertas NicolasHuertas commented Oct 17, 2024

Examples for Benchmark Testing

Cyclical Dependency Example

This project is designed to evaluate and benchmark the performance of EngFlow's remote execution and caching services. It specifically focuses on testing scenarios involving cyclical-like structures in the dependency graph, which are handled through interfaces and constructor injection.

The program takes a text input file and recursively prints each word with each class (ClassA prints a word, then ClassB, and so on) until the string is empty. The input file should be specified in the data attribute of the java_binary rule in the BUILD file.

Varying Input Example

The goal of this example project is to test the performance of Engflow's remote execution and caching service for different input sizes. The project involves creating using a class named Writer to create a specified number of txt files, each containing 100 random characters, and then reading and printing out their contents with the Reader class.

Set Input Example

Since the data dependencies in the previous examples are for files created during runtime. This example uses a genrule to write a set number of txt files instead of a Writer class. This way, the main binary can be built and run after the files are already created.

Binary Input Example

The goal of this example project is to test the performance of Engflow's remote execution and caching service based on the number of input binary files in the dependency graph. The project contains a genrule that generates a specified number of Java binaries for the genbinary Java library, which are then listed as dependencies in the main binary. The Main.java file loops through each generated class and calls its greetNum method.

How It Works

  1. Generation of Java Binaries:

    • The genrule in the BUILD file generates a specified number of Java classes (Hello1.java, Hello2.java, ..., HelloN.java).
    • Each generated class contains a greetNum method that prints a unique message.
  2. Main Class Execution:

    • The Main.java file in binaryinput dynamically loads each generated class using reflection.
    • It then invokes the greetNum method of each class, printing the corresponding message.

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file? Do things work without it? We should not need config files like this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a file created by IntelliJ to keep the module configuration. The program should work without it.

@anfelbar
Copy link
Collaborator

@NicolasHuertas thank you for doing this. Please reduce the description of this pull request to a short summary of the contribution. Anything else should be moved/reorganized into the README.md file.

@anfelbar anfelbar changed the title Internship [Internship] Benchmarking remote execution Oct 21, 2024
@anfelbar anfelbar requested a review from lfpino October 21, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants