mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: Optimize parial rego execution byte allocations (#6144)
* chore: Implement benchmark for authorizer.Prepare Identify time + alloc cost before optimizing
This commit is contained in:
@ -977,9 +977,14 @@ func testAuthorize(t *testing.T, name string, subject Subject, sets ...[]authTes
|
||||
|
||||
d, _ := json.Marshal(map[string]interface{}{
|
||||
// This is not perfect marshal, but it is good enough for debugging this test.
|
||||
"subject": subject,
|
||||
"object": c.resource,
|
||||
"action": a,
|
||||
"subject": authSubject{
|
||||
ID: subject.ID,
|
||||
Roles: must(subject.Roles.Expand()),
|
||||
Groups: subject.Groups,
|
||||
Scope: must(subject.Scope.Expand()),
|
||||
},
|
||||
"object": c.resource,
|
||||
"action": a,
|
||||
})
|
||||
|
||||
// Logging only
|
||||
|
Reference in New Issue
Block a user