Code Monkey home page Code Monkey logo

duckdb-wasm-test's Introduction

duckdb-wasm-test

Measure data fetched when duckdb-wasm queries .duckdb files in S3

Examples

Fetch 1 row

Fetch 1 row from each of several s3://duckdb-wasm-test/*.duckdb files in S3: (see fetch-1/)

Fetch 1 row with a specific id

(see select-1/)

Count rows

(see count-star/)

Methods

1. Perform queries, download .har file

npm install
next dev

Open the resulting server (likely at http://localhost:3000/), or visit runsascoded.com/duckdb-wasm-test:

  1. Enter query
  2. Clear "Network" tab
  3. Filter: ".duckdb"
  4. "Disable cache" ✅
  5. "Run all"
  6. Download .har file

2. Analyze .har file

Move .har file to this directory, and give it a name, e.g. the examples in this repo were generated from .hars named:

  • fetch-1.har (see fetch-1/: select * from crashes limit 1)
  • select-1.har (see select-1/: select * from crashes where id=50000)
  • count-star.har (see count-star/: select count(*) from crashes)

(the .hars themselves are .gitignored, as they're pretty large)

Then run analyze-reqs.ipynb on it:

name=fetch-1  # use your .har file's stem
query=…       # query you entered in step 1. above

pip install -r requirements.txt
mkdir -p "$name"
echo "$query" > "$name/query.sql"
nb=analyze-reqs.ipynb
papermill -p name "$name" $nb "$name/$nb"

The $name/ directory will contain a fetched.png like the plots above.

duckdb-wasm-test's People

Contributors

ryan-williams avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.