libsql icon indicating copy to clipboard operation
libsql copied to clipboard

add benchmark scripts

Open sivukhin opened this issue 1 year ago • 1 comments

Context

Several benchmark tools which I use for vector feature. This PR includes following scripts:

  • benchtest - generic tool which measure performance of any sequence of SQL statements
  • anntest - tool for measuring n-recall@k of ANN vector search
  • blobtest - simple tool which aims to prove that sqlite3_blob_reopen API can result in way better performance

See README.md for more details

sivukhin avatar Jul 11 '24 11:07 sivukhin

Nice, @sivukhin!

penberg avatar Jul 11 '24 15:07 penberg

In anntest you call srand(time(NULL)); at the beginning of main but you don't do that in the other two tests. Is this on purpose?

haaawk avatar Jul 12 '24 09:07 haaawk

@haaawk - I don't need srand in the anntest actually. This is "legacy" - initially I generated ANN workload right inside anntest C code but later decided to move it to the python workload.py script as it's easier to generate random floats with different distributions from there.

Removed it from the branch

sivukhin avatar Jul 12 '24 09:07 sivukhin