summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Peter Kalauskas <peskal@google.com> 2022-11-02 15:11:14 -0700
committer Peter Kalauskas <peskal@google.com> 2022-11-02 15:40:39 -0700
commit507bd034036f57c101bd3961c3797b31d05d8996 (patch)
tree76088363096255a7252f141bf16712238b83fd34 /api/api.go
parent3aac10797207384bead45934d0c49d2e23701830 (diff)
Check if tracing is on before generating strings
Guard Trace.beginSection to avoid unnecessary StringBuilder usage, which would result in GC garbage churn. Also, convert sections to instants when that is more applicable. This also guards against potential run-time crashes if the trace section string is longer than 127 characters. Finally, correct some tracing usage in try blocks. Test: manual Bug: 257075630 Change-Id: Ibe6f194c779256615a7887931256324f7c78811a
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions