18 #include <boost/variant.hpp> 42 boost::variant<int64_t, std::string, std::vector<std::string>>;
80 const std::type_info&
type()
const {
87 throw Exception(
"Not supported for type");
92 return folly::to<T>(operand);
115 return itr_ != event_.metaData_.end();
124 return itr_->second.getValueAs<
T>();
127 const std::type_info&
type()
const {
128 return itr_->second.type();
133 MetaDataMap::const_iterator
itr_;
202 return itr->second.getValueAs<
T>();
232 "readIntMeta should take an intergral type of paremeter");
242 friend std::ostream&
operator << (std::ostream& out,
253 dest = itr->second.getValueAs<
T>();
255 }
catch (
const std::exception&) {
282 boost::static_visitor<std::vector<std::string>> {
284 const std::vector<std::string>& operand)
const {
290 throw Exception(
"Not supported for type");
296 boost::static_visitor<std::string> {
301 return folly::to<std::string>(operand);
std::ostream & operator<<(std::ostream &os, const HeaderTable &table)
bool readBoolMeta(TraceFieldType key, bool &dest) const
Map field(FieldType Class::*field)
bool readIntMeta(TraceFieldType key, T &dest) const
const std::type_info & type() const
friend std::ostream & operator<<(std::ostream &out, const TraceEvent &event)
FB_EXPORT TraceEvent(TraceEventType type, uint32_t parentID=0)
uint32_t getParentID() const
const TraceEvent & event_
constexpr detail::Map< Move > move
std::string toString() const
auto begin(TestAdlIterable &instance)
MetaDataMap::const_iterator itr_
Iterator getMetaDataItr() const
bool readStrMeta(TraceFieldType key, std::string &dest) const
—— Concurrent Priority Queue Implementation ——
std::string toStdString(const folly::fbstring &s)
bool readMeta(TraceFieldType key, T &dest) const
std::map< TraceFieldType, MetaData > MetaDataMap
TraceEventType getType() const
Iterator(const TraceEvent &event)
TimePoint getStartTime() const
void end(const TimeUtil &tm)
std::enable_if< detail::is_chrono_conversion< Tgt, Src >::value, Tgt >::type to(const Src &value)
TimePoint getEndTime() const
const MetaDataMap & getMetaData() const
bool addMeta(TraceFieldType key, T &&value)
static const char *const value
bool addMeta(TraceFieldType key, const T &value)
void setMetaData(MetaDataMap &&input)
SteadyClock::time_point TimePoint
T getTraceFieldDataAs(TraceFieldType field) const
decltype(auto) apply_visitor(Visitor &&visitor, const DiscriminatedPtr< Args... > &variant)
void start(const TimeUtil &tm)
void setParentID(uint32_t parent)
bool hasTraceField(TraceFieldType field) const
FB_EXPORT bool addMetaInternal(TraceFieldType key, MetaData &&val)
folly::Function< void()> parent
TraceFieldType getKey() const