mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
pt-galera-log-explainer: removing redundant loop names
This commit is contained in:
@@ -40,11 +40,10 @@ func (timeline Timeline) MergeByIdentifier(lt LocalTimeline) {
|
|||||||
|
|
||||||
func (timeline Timeline) MergeByDirectory(path string, lt LocalTimeline) {
|
func (timeline Timeline) MergeByDirectory(path string, lt LocalTimeline) {
|
||||||
node := filepath.Base(filepath.Dir(path))
|
node := filepath.Base(filepath.Dir(path))
|
||||||
MERGE:
|
|
||||||
for _, lt2 := range timeline {
|
for _, lt2 := range timeline {
|
||||||
if len(lt2) > 0 && node == filepath.Base(filepath.Dir(lt2[0].LogCtx.FilePath)) {
|
if len(lt2) > 0 && node == filepath.Base(filepath.Dir(lt2[0].LogCtx.FilePath)) {
|
||||||
lt = MergeTimeline(lt2, lt)
|
lt = MergeTimeline(lt2, lt)
|
||||||
break MERGE
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeline[node] = lt
|
timeline[node] = lt
|
||||||
@@ -59,7 +58,6 @@ func (timeline Timeline) MergeByPodnameElsePath(path string, lt LocalTimeline) {
|
|||||||
timeline[path] = lt
|
timeline[path] = lt
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
MERGE:
|
|
||||||
for _, lt2 := range timeline {
|
for _, lt2 := range timeline {
|
||||||
if len(lt2) == 0 {
|
if len(lt2) == 0 {
|
||||||
continue
|
continue
|
||||||
@@ -70,7 +68,7 @@ MERGE:
|
|||||||
metadata.Namespace == metadata2.Namespace {
|
metadata.Namespace == metadata2.Namespace {
|
||||||
|
|
||||||
lt = MergeTimeline(lt2, lt)
|
lt = MergeTimeline(lt2, lt)
|
||||||
break MERGE
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeline[metadata.PodName] = lt
|
timeline[metadata.PodName] = lt
|
||||||
|
Reference in New Issue
Block a user