-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#11050] Extract LinkHistogramSummaryView
- Loading branch information
Showing
5 changed files
with
54 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
web/src/main/java/com/navercorp/pinpoint/web/view/LinkHistogramSummarySerializer.java
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
web/src/main/java/com/navercorp/pinpoint/web/view/LinkHistogramSummaryView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.navercorp.pinpoint.web.view; | ||
|
||
import com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogram; | ||
import com.navercorp.pinpoint.web.applicationmap.histogram.Histogram; | ||
import com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogramFormat; | ||
import com.navercorp.pinpoint.web.applicationmap.link.LinkHistogramSummary; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class LinkHistogramSummaryView { | ||
private final LinkHistogramSummary linkHistogramSummary; | ||
private final TimeHistogramFormat format; | ||
|
||
public LinkHistogramSummaryView(LinkHistogramSummary linkHistogramSummary, TimeHistogramFormat format) { | ||
this.linkHistogramSummary = Objects.requireNonNull(linkHistogramSummary, "linkHistogramSummary"); | ||
this.format = Objects.requireNonNull(format, "format"); | ||
} | ||
|
||
public String getKey() { | ||
return linkHistogramSummary.getLinkName().getName(); | ||
} | ||
|
||
public Histogram getHistogram() { | ||
return linkHistogramSummary.getHistogram(); | ||
} | ||
|
||
public List<TimeViewModel> getTimeSeriesHistogram() { | ||
ApplicationTimeHistogram histogram = linkHistogramSummary.getLinkApplicationTimeHistogram(); | ||
return histogram.createViewModel(format); | ||
} | ||
} |