Preserve the requested order for RTC event log plots
Also remove some unused using-declarations. Bug: None Change-Id: Ia31fc7b888f68eb322f54f08638e34d31db1dcf8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366080 Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43262}
This commit is contained in:
parent
337f6f2f93
commit
cecee51bc4
@ -697,10 +697,13 @@ void EventLogAnalyzer::InitializeMapOfNamedGraphs(bool show_detector_state,
|
||||
|
||||
void EventLogAnalyzer::CreateGraphsByName(const std::vector<std::string>& names,
|
||||
PlotCollection* collection) {
|
||||
for (const auto& plot : plots_) {
|
||||
if (absl::c_find(names, plot.label) != names.end()) {
|
||||
Plot* output = collection->AppendNewPlot(plot.label);
|
||||
plot.plot_func(output);
|
||||
for (absl::string_view name : names) {
|
||||
auto plot = absl::c_find_if(plots_, [name](const PlotDeclaration& plot) {
|
||||
return plot.label == name;
|
||||
});
|
||||
if (plot != plots_.end()) {
|
||||
Plot* output = collection->AppendNewPlot(plot->label);
|
||||
plot->plot_func(output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,8 +32,6 @@
|
||||
#include "rtc_tools/rtc_event_log_visualizer/proto/chart.pb.h"
|
||||
#endif
|
||||
|
||||
using webrtc::PacketDirection;
|
||||
|
||||
namespace {
|
||||
std::vector<std::string> StrSplit(const std::string& s,
|
||||
const std::string& delimiter) {
|
||||
|
||||
@ -117,8 +117,6 @@ ABSL_FLAG(bool,
|
||||
false,
|
||||
"List of registered plots (for use with the --plot flag)");
|
||||
|
||||
using webrtc::Plot;
|
||||
|
||||
namespace {
|
||||
std::vector<std::string> StrSplit(const std::string& s,
|
||||
const std::string& delimiter) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user