mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +01:00
fix python test import naming
This commit is contained in:
25
.github/workflows/rust_perf.yml
vendored
25
.github/workflows/rust_perf.yml
vendored
@@ -160,3 +160,28 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: TPC-H
|
- name: TPC-H
|
||||||
run: ./perf/tpc-h/benchmark.sh
|
run: ./perf/tpc-h/benchmark.sh
|
||||||
|
|
||||||
|
vfs-bench-compile:
|
||||||
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: useblacksmith/rust-cache@v3
|
||||||
|
with:
|
||||||
|
prefix-key: "v1-rust" # can be updated if we need to reset caches due to non-trivial change in the dependencies (for example, custom env var were set for single workspace project)
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release --verbose
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: useblacksmith/setup-uv@v4
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
run: uv python install
|
||||||
|
|
||||||
|
- name: Install the project
|
||||||
|
run: uv sync --package turso_test
|
||||||
|
|
||||||
|
- name: Run benchmark
|
||||||
|
run: uv run bench-vfs "SELECT 1;" 100
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import tempfile
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
from faker import Faker
|
from faker import Faker
|
||||||
from faker.providers.lorem.en_US import Provider as P
|
from faker.providers.lorem.en_US import Provider as P
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
|
|
||||||
sqlite_exec = "./scripts/limbo-sqlite3"
|
sqlite_exec = "./scripts/limbo-sqlite3"
|
||||||
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
||||||
@@ -343,7 +343,7 @@ def test_kv():
|
|||||||
|
|
||||||
|
|
||||||
def _test_kv(exec_name, ext_path):
|
def _test_kv(exec_name, ext_path):
|
||||||
console.info(f"Running test_kv for {ext_path}")
|
console.info(f"Running test_kv for {ext_path} in {exec_name}")
|
||||||
|
|
||||||
limbo = TestTursoShell(
|
limbo = TestTursoShell(
|
||||||
exec_name=exec_name,
|
exec_name=exec_name,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
|
|
||||||
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# vfs benchmarking/comparison
|
# vfs benchmarking/comparison
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import statistics
|
import statistics
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -10,11 +11,13 @@ from time import perf_counter, sleep
|
|||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from cli_tests.console import error, info, test
|
from cli_tests.console import error, info, test
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
|
|
||||||
LIMBO_BIN = Path("./target/release/limbo")
|
LIMBO_BIN = Path("./target/release/tursodb")
|
||||||
DB_FILE = Path("testing/temp.db")
|
DB_FILE = Path("testing/temp.db")
|
||||||
vfs_list = ["syscall", "io_uring"]
|
vfs_list = ["syscall"]
|
||||||
|
if platform.system() == "Linux":
|
||||||
|
vfs_list.append("io_uring")
|
||||||
|
|
||||||
|
|
||||||
def append_time(times, start, perf_counter):
|
def append_time(times, start, perf_counter):
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import tempfile
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from cli_tests import console
|
from cli_tests import console
|
||||||
from cli_tests.test_limbo_cli import TestTursoShell
|
from cli_tests.test_turso_cli import TestTursoShell
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
|
||||||
@@ -39,8 +39,8 @@ class InsertTest(BaseModel):
|
|||||||
big_stmt.append("SELECT count(*) FROM test;")
|
big_stmt.append("SELECT count(*) FROM test;")
|
||||||
expected.append(str(self.vals * 2))
|
expected.append(str(self.vals * 2))
|
||||||
|
|
||||||
big_stmt.append("DELETE FROM temp;")
|
big_stmt.append("DELETE FROM test;")
|
||||||
big_stmt.append("SELECT count(*) FROM temp;")
|
big_stmt.append("SELECT count(*) FROM test;")
|
||||||
expected.append(str(0))
|
expected.append(str(0))
|
||||||
|
|
||||||
big_stmt = "".join(big_stmt)
|
big_stmt = "".join(big_stmt)
|
||||||
|
|||||||
Reference in New Issue
Block a user