feat: Windows notifications, benchmarks, GPG signing, docs site, one-liner installers

This commit is contained in:
2026-08-14 10:57:20 -04:00
parent 448d2c4ead
commit 35c6b98aec
12 changed files with 555 additions and 16 deletions
+41
View File
@@ -0,0 +1,41 @@
package dedup
import (
"testing"
"time"
)
func BenchmarkShouldIgnoreNewContent(b *testing.B) {
f := NewFilter("machine-a")
payload := Payload{
Text: "benchmark content string",
Ts: time.Now().UnixNano(),
Origin: "machine-b",
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = f.ShouldIgnore(payload)
}
}
func BenchmarkShouldIgnoreImage(b *testing.B) {
f := NewFilter("machine-a")
payload := Payload{
Mime: "image/png",
Data: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
Ts: time.Now().UnixNano(),
Origin: "machine-b",
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = f.ShouldIgnore(payload)
}
}
func BenchmarkMarkWritten(b *testing.B) {
f := NewFilter("machine-a")
b.ResetTimer()
for i := 0; i < b.N; i++ {
f.MarkWritten("some clipboard text")
}
}