Faculty of Informatics – Università della Svizzera italiana (USI)

S2S and BSS


S2S is a benchmark suite generator for the Java Stream API which compiles SQL queries into Java source code.

The Java Stream API was introduced in Java 8, allowing developers to express computations in a functional style by defining a pipeline of data-processing operations. Despite the growing importance of this API, there is a lack of benchmarks specifically targeting stream-based applications. Instead of designing and implementing new ad-hoc workloads for the Java Stream API, we aim at automatically translating existing data-processing workloads. To this end, we introduce S2S, an automatic benchmark generator for the Java Stream API. S2S is a SQL query compiler that converts existing workloads designed for relational databases to stream-based code.


BSS is the first benchmark suite for the Java Stream API.

BSS has been obtained by executing S2S on a set of SQL queries that have been proposed as benchmarks by the authors of the stream-fusion engine. The SQL queries are based on the dataset of TPC-H.


Both S2S and BSS are open-source and are accessible on GitHub at the following links:

S2S: Automatic Benchmark Generator for the Stream API

BSS: Benchmark Suite for the Java Stream API

Key Publications

[1] Filippo Schiavio, Andrea Rosà, Walter Binder: SQL to Stream with S2S – an Automatic Benchmark Generator for the Java Stream API. GPCE 2022: 179-186 [pdf][APLAS’20 slides][SPLASH’22 slides]