policy_test.go 364 B

1234567891011121314151617181920212223
  1. package service
  2. import (
  3. "context"
  4. "fmt"
  5. "testing"
  6. "go-common/app/interface/main/player/conf"
  7. )
  8. // test func Player
  9. func BenchmarkPolicy(b *testing.B) {
  10. if err := conf.Init(); err != nil {
  11. fmt.Println(err)
  12. }
  13. ser := New(conf.Conf)
  14. c := context.Background()
  15. b.RunParallel(func(pb *testing.PB) {
  16. for pb.Next() {
  17. ser.Policy(c, 1, 6698028)
  18. }
  19. })
  20. }