Commit graph

6 commits

Author SHA1 Message Date
Claude
4609b7b2bf
feat: Expose networking analytics for KD-Tree NAT routing
Add comprehensive networking analytics to support peer selection based
on performance and trust metrics for KD-Tree based NAT routing:

- Add kdtree_analytics.go with TreeAnalytics, PeerAnalytics,
  DistributionStats, NATRoutingMetrics, TrustMetrics, and
  QualityWeights structures
- Track query/insert/delete operations with timing statistics
- Track per-peer selection frequency and average distances
- Add PeerQualityScore() for composite peer ranking
- Add ComputeTrustScore() for reputation-based selection
- Add distribution statistics (min, max, mean, median, percentiles)
- Add feature normalization helpers for multi-dimensional peer data

WASM/TypeScript integration:
- Expose all analytics via WASM bindings
- Update TypeScript definitions with full type coverage
- Update loader.js with new API methods
- Update TypeScript demo to showcase analytics features

Includes comprehensive test coverage for all analytics functionality.
2025-12-25 12:18:18 +00:00
Snider
3c83fc38e4 Add dual-backend support for KDTree with benchmarks and documentation updates 2025-11-04 01:44:16 +00:00
Snider
3886724129 Add Cosine and Weighted Cosine distance metrics, enhance KDTree helpers, and update version to 0.3.0 2025-11-03 18:51:23 +00:00
Snider
dad508de31 Add lint configuration, benchmarks, and documentation for KDTree 2025-11-03 18:19:12 +00:00
Snider
ec61d6afde Add CI workflow and update documentation for KDTree version 2025-11-03 18:10:49 +00:00
Snider
736ce911e0 Add KDTree implementation and example for finding the best DHT peer by ping 2025-11-03 16:49:31 +00:00