diff --git a/examples/pg-stat-analysis/README.md b/examples/pg-stat-analysis/README.md index d5e8694a..996e2143 100644 --- a/examples/pg-stat-analysis/README.md +++ b/examples/pg-stat-analysis/README.md @@ -10,13 +10,6 @@ `@inferable/pg-stat-analysis` is an analytical agent designed to evaluate and improve the performance of your PostgreSQL database through recommendations based on access patterns. The agent provides suggestions such as creating indexes or other optimization strategies to enhance query performance. It makes use of the `pg_stat_statements` extension to provide data-driven recommendations. -## Features - -- Analyzes PostgreSQL database performance using `pg_stat_statements`. -- Provides suggestions for performance improvements. -- Avoids recommending redundant actions, such as VACUUM suggestions if auto-vacuum is enabled. -- Utilizes type-safety via Zod schema validation. - ## Prerequisites - **Node.js** - Ensure you have Node.js installed. diff --git a/examples/pg-stat-analysis/src/index.ts b/examples/pg-stat-analysis/src/index.ts index e6b9c641..e30fac77 100644 --- a/examples/pg-stat-analysis/src/index.ts +++ b/examples/pg-stat-analysis/src/index.ts @@ -2,7 +2,7 @@ import { readFileSync, writeFileSync, existsSync } from 'fs'; import { Inferable } from 'inferable'; import { z } from 'zod'; -const HISTORY_PATH = './history.json'; +const HISTORY_PATH = path.join(__dirname, 'history.json') if (!existsSync(HISTORY_PATH)) { writeFileSync(HISTORY_PATH, JSON.stringify({ suggestions: [] }));