Performance benchmarking
Code optimization often requires measuring and monitoring the execution timings as performance tuning is under taken. It is important to make sure that a consistent methodology is followed so that the same benchmark can be compared over time. SQL Frames provides a simple and easy to use API to perform benchmarking of your data transformation logic.
Loading...
tip
SQL Frames is both reactive and lazy. Hence, it is possible to setup benchmark for only part of the data transformation. Make sure to precompute all the dependencies so the benchmark only captures the time for the specific data transformation step (or a few steps).
The DataFrame.benchmark()
API takes an optional second parameter called options. It is defined as follows
type DataFrameBenchmarkOptions = {
times: number, // number of times to compute the df
ignore?: number, // an optional number of times to compute at the beginning and ignore
}