Commit 433f564
authored
Excessive allocations in Firebase Trace.incrementMetric (#7984)
**Fixes:**
#1923
**Quick Summary:**
Current PR addresses an optimization at
PerfMetricValidator.validateTraceName(), it also gates the Metric
logging after this validation succeed within Trace.incrementMetric()
(allowing the log building if the flag is enabled) and optimizes this
String building process (using String template instead of
String.format).1 parent 25e26e0 commit 433f564
2 files changed
Lines changed: 12 additions & 3 deletions
File tree
- firebase-perf/src/main/java/com/google/firebase/perf/metrics
- validator
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
0 commit comments