blob: d12b42d52283b2eda3c013050fd0388533353c4d [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "garnet/lib/measure/event_spec.h"
#include <ostream>
#include <string>
namespace tracing {
namespace measure {
bool EventMatchesSpec(const trace::Record::Event& event,
const EventSpec& spec) {
return event.name == spec.name && event.category == spec.category;
}
std::ostream& operator<<(std::ostream& os, EventSpec event_spec) {
return os << event_spec.category.c_str() << ":" << event_spec.name.c_str();
}
} // namespace measure
} // namespace tracing