(b *testing.B)
| 350 | } |
| 351 | |
| 352 | func BenchmarkReadOnlyMapper(b *testing.B) { |
| 353 | ctx := context.Background() |
| 354 | reg := driver.NewSqliteTestRegistry(b, false, |
| 355 | driver.WithNamespaces([]*namespace.Namespace{{Name: "test"}})) |
| 356 | m := reg.ReadOnlyMapper() |
| 357 | |
| 358 | b.Run("FromTuple", func(b *testing.B) { |
| 359 | for i := 0; i < b.N; i++ { |
| 360 | _, err := m.FromTuple(ctx, &ketoapi.RelationTuple{ |
| 361 | Namespace: "test", |
| 362 | Object: "object", |
| 363 | Relation: "relation", |
| 364 | SubjectSet: &ketoapi.SubjectSet{ |
| 365 | Namespace: "test", |
| 366 | Object: "subject object", |
| 367 | Relation: "relation", |
| 368 | }, |
| 369 | }) |
| 370 | assert.NoError(b, err) |
| 371 | } |
| 372 | }) |
| 373 | } |
nothing calls this directly
no test coverage detected