mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 13:32:08 +01:00
feat: complete development environment setup and code quality improvements
- Set up pre-commit hooks with husky and lint-staged for automated code quality - Improved TypeScript type safety by replacing 'any' types with proper generics - Fixed markdown linting violations (MD030 spacing) across all documentation - Fixed compound adjective hyphenation in technical documentation - Fixed invalid JSON union syntax in API documentation examples - Automated code formatting and linting on commit - Enhanced error handling with better type constraints - Configured biome and markdownlint for consistent code style - All changes verified with successful production build
This commit is contained in:
@ -5,14 +5,14 @@
|
||||
* to improve system performance based on real-time metrics.
|
||||
*/
|
||||
|
||||
import {
|
||||
performanceMonitor,
|
||||
type PerformanceMetrics,
|
||||
type Bottleneck,
|
||||
} from "./monitor";
|
||||
import { cacheManager, type CacheStats } from "./cache";
|
||||
import { deduplicationManager } from "./deduplication";
|
||||
import { TIME } from "../constants";
|
||||
import { type CacheStats, cacheManager } from "./cache";
|
||||
import { deduplicationManager } from "./deduplication";
|
||||
import {
|
||||
type Bottleneck,
|
||||
type PerformanceMetrics,
|
||||
performanceMonitor,
|
||||
} from "./monitor";
|
||||
|
||||
/**
|
||||
* Optimization action types
|
||||
@ -40,8 +40,8 @@ export interface OptimizationResult {
|
||||
success: boolean;
|
||||
message: string;
|
||||
metrics?: {
|
||||
before: any;
|
||||
after: any;
|
||||
before: Record<string, unknown>;
|
||||
after: Record<string, unknown>;
|
||||
improvement: number; // Percentage
|
||||
};
|
||||
};
|
||||
@ -408,18 +408,17 @@ export class PerformanceOptimizer {
|
||||
},
|
||||
timestamp: new Date(),
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
action: OptimizationAction.TRIGGER_GARBAGE_COLLECTION,
|
||||
target: "system",
|
||||
applied: false,
|
||||
result: {
|
||||
success: false,
|
||||
message: "Garbage collection not available (run with --expose-gc)",
|
||||
},
|
||||
timestamp: new Date(),
|
||||
};
|
||||
}
|
||||
return {
|
||||
action: OptimizationAction.TRIGGER_GARBAGE_COLLECTION,
|
||||
target: "system",
|
||||
applied: false,
|
||||
result: {
|
||||
success: false,
|
||||
message: "Garbage collection not available (run with --expose-gc)",
|
||||
},
|
||||
timestamp: new Date(),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
action: OptimizationAction.TRIGGER_GARBAGE_COLLECTION,
|
||||
|
||||
Reference in New Issue
Block a user