mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
Upgrade to SQLite 3.38.5 (#91)
* Update to SQLite 3.37 and latest generate_series extension * Expect column types in upper case * Rebuild newer SQLite, 3.38.5
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM node:12-buster
|
FROM node:14-bullseye
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
echo 'deb http://deb.debian.org/debian unstable main' \
|
echo 'deb http://deb.debian.org/debian unstable main' \
|
||||||
|
|||||||
@@ -1,21 +1,44 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm -rf lib/dist $flag_file
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
if [ ! -f sample.csv ]; then
|
if [ ! -f sample.csv ]; then
|
||||||
wget --header="accept-encoding: gzip" -q -O- \
|
wget --header="accept-encoding: gzip" -q -O- \
|
||||||
https://github.com/plotly/datasets/raw/547090bd/wellspublic.csv \
|
https://github.com/plotly/datasets/raw/547090bd/wellspublic.csv \
|
||||||
| gunzip -c > sample.csv
|
| gunzip -c > sample.csv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# for renice to work run like "sudo -E env PATH=$PATH ./make.sh"
|
||||||
|
test_ni=$(nice -n -1 nice)
|
||||||
|
if [ $test_ni == -1 ]; then
|
||||||
|
flag_file=$(mktemp)
|
||||||
|
fi
|
||||||
|
(
|
||||||
|
while [ -f $flag_file ]; do
|
||||||
|
root_pid=$(
|
||||||
|
docker ps -f status=running -f name='^sqljs-benchmark-' -q \
|
||||||
|
| xargs -r -I{} -- docker inspect -f '{{.State.Pid}}' {}
|
||||||
|
)
|
||||||
|
if [ ! -z $root_pid ]; then
|
||||||
|
procpath query -d $'\n' "$..children[?(@.stat.pid == $root_pid)]..pid" \
|
||||||
|
| xargs -I{} -- renice -n -1 -p {} > /dev/null
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done &
|
||||||
|
)
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
for d in lib/build-* ; do
|
for d in lib/build-* ; do
|
||||||
rm -r lib/dist || true
|
rm -rf lib/dist
|
||||||
cp -r $d lib/dist
|
cp -r $d lib/dist
|
||||||
|
|
||||||
name=$(basename $d)
|
name=$(basename $d)
|
||||||
docker build -t sqliteviz/sqljs-benchmark:$name .
|
docker build -t sqliteviz/sqljs-benchmark:$name .
|
||||||
docker rm sqljs-benchmark-$name 2> /dev/null || true
|
docker rm sqljs-benchmark-$name 2> /dev/null || true
|
||||||
docker run -it --name sqljs-benchmark-$name sqliteviz/sqljs-benchmark:$name
|
docker run -it --cpus 2 --name sqljs-benchmark-$name sqliteviz/sqljs-benchmark:$name
|
||||||
docker cp sqljs-benchmark-$name:/tmp/build/suite-result.json ${name}-result.json
|
docker cp sqljs-benchmark-$name:/tmp/build/suite-result.json ${name}-result.json
|
||||||
docker rm sqljs-benchmark-$name
|
docker rm sqljs-benchmark-$name
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -r lib/dist
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"benchmark_path = Path('/path/to/sqliteviz/project/sqliteviz/lib/sql-js/benchmark')"
|
"benchmark_path = Path()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from pathlib import Path
|
|||||||
from urllib import request
|
from urllib import request
|
||||||
|
|
||||||
|
|
||||||
amalgamation_url = 'https://sqlite.org/2021/sqlite-amalgamation-3360000.zip'
|
amalgamation_url = 'https://sqlite.org/2022/sqlite-amalgamation-3380500.zip'
|
||||||
|
|
||||||
# Extension-functions
|
# Extension-functions
|
||||||
# ===================
|
# ===================
|
||||||
@@ -20,7 +20,7 @@ contrib_functions_url = 'https://sqlite.org/contrib/download/extension-functions
|
|||||||
extension_urls = (
|
extension_urls = (
|
||||||
# Miscellaneous extensions
|
# Miscellaneous extensions
|
||||||
# ========================
|
# ========================
|
||||||
('https://sqlite.org/src/raw/c6bd5d24?at=series.c', 'sqlite3_series_init'),
|
('https://sqlite.org/src/raw/8d79354f?at=series.c', 'sqlite3_series_init'),
|
||||||
('https://sqlite.org/src/raw/dbfd8543?at=closure.c', 'sqlite3_closure_init'),
|
('https://sqlite.org/src/raw/dbfd8543?at=closure.c', 'sqlite3_closure_init'),
|
||||||
('https://sqlite.org/src/raw/5bb2264c?at=uuid.c', 'sqlite3_uuid_init'),
|
('https://sqlite.org/src/raw/5bb2264c?at=uuid.c', 'sqlite3_uuid_init'),
|
||||||
('https://sqlite.org/src/raw/5853b0e5?at=regexp.c', 'sqlite3_regexp_init'),
|
('https://sqlite.org/src/raw/5853b0e5?at=regexp.c', 'sqlite3_regexp_init'),
|
||||||
|
|||||||
2
lib/sql-js/dist/sql-wasm.js
vendored
2
lib/sql-js/dist/sql-wasm.js
vendored
File diff suppressed because one or more lines are too long
BIN
lib/sql-js/dist/sql-wasm.wasm
vendored
BIN
lib/sql-js/dist/sql-wasm.wasm
vendored
Binary file not shown.
@@ -44,7 +44,7 @@ describe('database.js', () => {
|
|||||||
expect(schema[0].columns[0].type).to.equal('N/A')
|
expect(schema[0].columns[0].type).to.equal('N/A')
|
||||||
|
|
||||||
expect(schema[0].columns[1].name).to.equal('col2')
|
expect(schema[0].columns[1].name).to.equal('col2')
|
||||||
expect(schema[0].columns[1].type).to.equal('integer')
|
expect(schema[0].columns[1].type).to.equal('INTEGER')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('creates schema with view', async () => {
|
it('creates schema with view', async () => {
|
||||||
@@ -68,12 +68,12 @@ describe('database.js', () => {
|
|||||||
|
|
||||||
expect(schema[0].columns[1]).to.eql({
|
expect(schema[0].columns[1]).to.eql({
|
||||||
name: 'col2',
|
name: 'col2',
|
||||||
type: 'integer'
|
type: 'INTEGER'
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(schema[1].columns).to.eql([{
|
expect(schema[1].columns).to.eql([{
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
type: 'integer'
|
type: 'INTEGER'
|
||||||
}])
|
}])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user