Skip to content

Commit 9f5455d

Browse files
committed
add temporary logs
1 parent a542fdb commit 9f5455d

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/lib/server/db.catdat.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ import type { Arrayed } from '$lib/commons/types'
22
import Database, { SqliteError } from 'better-sqlite3'
33
import { join } from 'node:path'
44

5+
console.info('---- DB.CATDAT.TS ----')
6+
57
const db_path = join(process.cwd(), 'databases', 'catdat', 'catdat.db')
68

9+
console.info('DB_PATH', db_path)
10+
711
const db = new Database(db_path, { readonly: true })
812

913
/**

src/routes/category-comparison/[...ids]/+page.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { MAX_CATEGORIES_COMPARE } from '../compare.config'
66
export const prerender = false
77

88
export const load = async (event) => {
9+
console.info(event.params.ids)
10+
console.time('comparison time')
11+
912
const compared_ids = event.params.ids.split('/')
1013

1114
if (!compared_ids.length) error(400, 'No category selected for comparison')
@@ -84,6 +87,8 @@ export const load = async (event) => {
8487
'cache-control': 'public, max-age=0, s-maxage=1800',
8588
})
8689

90+
console.timeEnd('comparison time')
91+
8792
return {
8893
categories: render_nested_formulas(categories),
8994
comparison_table,

src/routes/category-search/results/+page.server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ import { search_handler } from '$lib/server/search'
33
export const prerender = false
44

55
export const load = async (event) => {
6-
return search_handler(event, 'category')
6+
console.info(event.url.search)
7+
console.time('search time')
8+
const handler = search_handler(event, 'category')
9+
console.timeEnd('search time')
10+
return handler
711
}

0 commit comments

Comments
 (0)