@coherent.js/profiler
v1.0.0-beta.5
Published
Performance profiling and monitoring tools for Coherent.js applications
Maintainers
Readme
@coherent.js/profiler
Advanced performance monitoring and profiling tools for Coherent.js applications.
Installation
npm install @coherent.js/profilerExports
Performance profiling tools
Modular Imports (Tree-Shakable)
- Profiler utilities:
@coherent.js/profiler
Example Usage
import { createProfiler } from '@coherent.js/profiler';Note: All exports are tree-shakable. Import only what you need for optimal bundle size.
Usage
Basic Profiling
import { PerformanceProfiler } from '@coherent.js/profiler';
const profiler = new PerformanceProfiler();
const profileId = profiler.startProfile('render-component');
profiler.mark(profileId, 'start-render');
// ... your code
profiler.mark(profileId, 'end-render');
const report = profiler.endProfile(profileId);Metrics Collection
import { MetricsCollector } from '@coherent.js/performance-profiler';
const collector = new MetricsCollector();
collector.recordMetric('render-time', 16.5);Performance Dashboard
import { createDashboard } from '@coherent.js/performance-profiler';
const dashboard = createDashboard(profiler);
const dashboardHTML = dashboard.render();