Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ backend, ClickHouse/Tinybird as the warehouse, PlanetScale Postgres for relation
- `lib/*`: zero Maple knowledge, could ship as a standalone OSS library. A `lib/` package that
imports `@maple/domain` must move to `packages/`. New packages default to `packages/`.

`@maple-dev/effect-clickhouse` lives in the separate effect-clickhouse repo; change it there.
`@maple-dev/effect-orm` lives in the separate effect-orm repo; change it there.

## Commands

Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@effect/platform-bun": "catalog:effect",
"@maple-dev/effect-clickhouse": "0.2.0",
"@maple-dev/effect-orm": "0.2.0",
"@maple-dev/effect-sdk": "workspace:*",
"@maple/ai-model-catalog": "workspace:*",
"@maple/auth": "workspace:*",
Expand Down
5 changes: 3 additions & 2 deletions apps/api/scripts/bench-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { Clock, Config, Console, Context, Effect, FileSystem, Layer, Option, Red
import { Command, Flag } from "effect/cli"
import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/http"
import { BunRuntime, BunServices } from "@effect/platform-bun"
import { OrgId } from "@maple/domain"
import { CH } from "@maple/query-engine"
import * as Integrations from "@maple/query-engine-integrations"
import * as Bench from "@maple/query-engine/benchmark"
import { collectWarehouseQueryCatalog } from "./query-bench/catalog"
import { runCli } from "@maple-dev/effect-clickhouse/benchmark/cli"
import { runCli } from "@maple-dev/effect-orm/benchmark/cli"

// Errors

Expand Down Expand Up @@ -310,7 +311,7 @@ const fetchHandler = Effect.fn("bench.fetch")(function* (config: FetchConfig) {
const orgId = yield* Option.match(config.org, {
onNone: () => tinybird.internalOrgId,
onSome: (o) => Effect.succeed(o),
})
}).pipe(Effect.flatMap(Schema.decodeUnknownEffect(OrgId)))
const host = yield* tinybird.host

const compiled = yield* CH.compile(
Expand Down
2 changes: 1 addition & 1 deletion apps/api/scripts/bench-suites/services.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** Edit the inputs to a representative fixed window in a populated snapshot. */
import * as CH from "@maple/query-engine/ch"
import * as Bench from "@maple-dev/effect-clickhouse/benchmark"
import * as Bench from "@maple-dev/effect-orm/benchmark"

export default Bench.defineSuite({
name: "services-workload",
Expand Down
6 changes: 3 additions & 3 deletions apps/api/scripts/query-bench/catalog.clickhouse.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { mkdir, readFile, writeFile } from "node:fs/promises"
import { fileURLToPath } from "node:url"
import { join } from "node:path"
import * as CH from "@maple/query-engine/ch"
import type { CompiledQueryDecodeError } from "@maple-dev/effect-clickhouse"
import type { CompiledQueryDecodeError } from "@maple-dev/effect-orm/clickhouse"
import { caseFromCompiled, RunOutput, Suite } from "@maple/query-engine/benchmark"
import { collectWarehouseQueryCatalog } from "./catalog"
import { normalizeSqlForClickHouseClient } from "@maple/query-engine/execution"
Expand Down Expand Up @@ -78,7 +78,7 @@ const benchScript = fileURLToPath(new URL("../bench-queries.ts", import.meta.url
const runCli = async (label: string, args: ReadonlyArray<string>) => {
const result = await new Promise<{ code: number; output: string }>((resolve, reject) => {
const nodeBin = fileURLToPath(
new URL("bin.mjs", import.meta.resolve("@maple-dev/effect-clickhouse/benchmark/cli")),
new URL("bin.mjs", import.meta.resolve("@maple-dev/effect-orm/benchmark/cli")),
)
const child = spawn(
label === "baseline" ? "node" : "bun",
Expand Down Expand Up @@ -340,7 +340,7 @@ describe.skipIf(!clickhouseE2eEnabled)("Query benchmark catalog analyzer sweep",
candidateSuite,
`
import * as CH from "@maple/query-engine/ch"
import * as Bench from "@maple-dev/effect-clickhouse/benchmark"
import * as Bench from "@maple-dev/effect-orm/benchmark"
export default Bench.defineSuite({ name: "populated-maple-e2e", dataset: ${JSON.stringify(database)}, cases: [
Bench.query({ id: "traces/overview/5m", inputs: ${JSON.stringify({ ...inputs, ...options })}, compile: (values) => CH.compile(CH.tracesTimeseriesQuery({ ...values, overviewTiers: "minute" }), values), results: "unordered" }),
Bench.query({ id: "services/facets", inputs: ${JSON.stringify(inputs)}, compile: (values) => CH.compileUnion(CH.servicesFacetsQuery(), values), results: "unordered" }),
Expand Down
Loading
Loading