[fix](profilev2) fix merge profile min is zero #27524

This commit is contained in:
Mryange
2023-11-24 14:11:11 +08:00
committed by GitHub
parent dbff9d7a89
commit 540132f656

View File

@ -493,7 +493,8 @@ public class RuntimeProfile {
Counter counter = templateProfile.counterMap.get(childCounterName);
mergeCounters(childCounterName, profiles, simpleProfile);
if (counter.getLevel() == 1) {
AggCounter aggCounter = new AggCounter(profiles.get(0).counterMap.get(childCounterName).getType(), 0);
Counter oldCounter = profiles.get(0).counterMap.get(childCounterName);
AggCounter aggCounter = new AggCounter(oldCounter.getType(), oldCounter.getValue());
for (RuntimeProfile profile : profiles) {
Counter orgCounter = profile.counterMap.get(childCounterName);
aggCounter.addCounter(orgCounter);