hash_test.go 642 B

1234567891011121314151617181920
  1. package hast_test
  2. import (
  3. "fmt"
  4. "testing"
  5. "github.com/spaolacci/murmur3"
  6. )
  7. func TestXmurmur(t *testing.T) {
  8. s := "/m3event/devops/alerts_status10.1.0.1ICMP1311223322331"
  9. // 2419174761762018589
  10. // s := "/m3event/devops/alerts_status10.1.0.1" // => 2717582454611764458
  11. // s := "/m3event/devops/alerts_status10.1.0.1ICMP13" // => 11724275543686760652
  12. // s := "/m3event/devops/alerts_status10.1.0.1ICMP131122332233" // => 16590484953594540623
  13. // s := "/m3event/devops/alerts_status10.1.0.1ICMP1311223322331" // => 14123040702697061094
  14. h := murmur3.New64()
  15. h.Write([]byte(s))
  16. fmt.Printf("murmur3.Sum64 %s => %d\n", s, h.Sum64())
  17. }