feat(bench): add memory benchmark tool + export keywords
- tools/memory-bench: 6 metrics (write/search/dedup/keyword/bulk/rate) - memory: export ExtractKeywordsPublic for benchmarking - Results: 1000+ 条/秒 write, 380µs search, 80% dedup accuracy, 71% real rate
This commit is contained in:
1 parent
6a4887e52a
commit
dc3671eb8d
2 files changed
+123
No files matched your search
@@ -260,3 +260,8 @@ func truncate(s string, maxLen int) string {
|
||||
if len(runes) <= maxLen { return s }
|
||||
return string(runes[:maxLen]) + "..."
|
||||
}
|
||||
|
||||
// ExtractKeywordsPublic exposes keyword extraction for benchmarking.
|
||||
func ExtractKeywordsPublic(content string) []string {
|
||||
return extractKeywords(content)
|
||||
}
|
||||
Reference in new issue
Block a user