Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TimelineEvent Class Reference

Copyright 2016 Google Inc. More...

#include "timelineevent.h"

Inheritance diagram for TimelineEvent:
Collaboration diagram for TimelineEvent:

Public Types

enum  Type : char {
  Type::kNode,
  Type::kEvent,
  Type::kThread,
  Type::kFrame,
  Type::kScope,
  Type::kRange
}
 
typedef std::vector
< std::unique_ptr
< TimelineNode > > 
Children
 

Public Member Functions

 TimelineEvent (const std::string &name, const uint32 begin, const uint32 duration, const Json::Value &args)
 Copyright 2016 Google Inc. More...
 
void SetArgs (const Json::Value &args)
 Set the argument name and value. More...
 
Type GetType () const override
 
const Json::Value & GetArgs () const
 
Json::Value & GetArgs ()
 
void AddChild (std::unique_ptr< TimelineNode > child)
 Add a node to the children. It becomes the last child. More...
 
void UpdateDuration (const uint32 end)
 Update the duration of the event given a new end timestamp. More...
 
const std::string & GetName () const
 
uint32 GetBegin () const
 
uint32 GetEnd () const
 
uint32 GetDuration () const
 
double GetBeginMs () const
 
double GetEndMs () const
 
double GetDurationMs () const
 
const TimelineNodeGetParent () const
 
TimelineNodeGetParent ()
 
const ChildrenGetChildren () const
 
const TimelineNodeGetChild (const size_t i) const
 

Detailed Description

Copyright 2016 Google Inc.

All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.TimelineEvent is a node in a Timeline that corresponds to a trace event (or a start/end pair of events)

Definition at line 29 of file timelineevent.h.

Member Typedef Documentation

typedef std::vector<std::unique_ptr<TimelineNode> > TimelineNode::Children
inherited

Definition at line 30 of file timelinenode.h.

Member Enumeration Documentation

enum TimelineNode::Type : char
stronginherited
Enumerator
kNode 
kEvent 
kThread 
kFrame 
kScope 
kRange 

Definition at line 31 of file timelinenode.h.

Constructor & Destructor Documentation

TimelineEvent::TimelineEvent ( const std::string &  name,
const uint32  begin,
const uint32  duration,
const Json::Value &  args 
)

Copyright 2016 Google Inc.

All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 25 of file timelineevent.cc.

Member Function Documentation

void TimelineNode::AddChild ( std::unique_ptr< TimelineNode child)
inlineinherited

Add a node to the children. It becomes the last child.

Definition at line 71 of file timelinenode.h.

Referenced by ion::profile::TraceRecorder::AddTraceToTimelineNode(), and ion::profile::CallTraceManager::BuildTimeline().

const Json::Value& TimelineEvent::GetArgs ( ) const
inline

Definition at line 38 of file timelineevent.h.

Json::Value& TimelineEvent::GetArgs ( )
inline

Definition at line 39 of file timelineevent.h.

uint32 TimelineNode::GetBegin ( ) const
inlineinherited

Definition at line 45 of file timelinenode.h.

double TimelineNode::GetBeginMs ( ) const
inlineinherited

Definition at line 48 of file timelinenode.h.

const TimelineNode* TimelineNode::GetChild ( const size_t  i) const
inlineinherited

Definition at line 54 of file timelinenode.h.

const Children& TimelineNode::GetChildren ( ) const
inlineinherited

Definition at line 53 of file timelinenode.h.

Referenced by Timeline::const_iterator::operator++().

uint32 TimelineNode::GetDuration ( ) const
inlineinherited

Definition at line 47 of file timelinenode.h.

double TimelineNode::GetDurationMs ( ) const
inlineinherited

Definition at line 50 of file timelinenode.h.

uint32 TimelineNode::GetEnd ( ) const
inlineinherited

Definition at line 46 of file timelinenode.h.

Referenced by ion::profile::TraceRecorder::AddTraceToTimelineNode().

double TimelineNode::GetEndMs ( ) const
inlineinherited

Definition at line 49 of file timelinenode.h.

const std::string& TimelineNode::GetName ( ) const
inlineinherited

Definition at line 43 of file timelinenode.h.

const TimelineNode* TimelineNode::GetParent ( ) const
inlineinherited
TimelineNode* TimelineNode::GetParent ( )
inlineinherited

Definition at line 52 of file timelinenode.h.

Type TimelineEvent::GetType ( ) const
inlineoverridevirtual

Reimplemented from TimelineNode.

Reimplemented in TimelineFrame, TimelineScope, and TimelineRange.

Definition at line 37 of file timelineevent.h.

References TimelineNode::kEvent.

void TimelineEvent::SetArgs ( const Json::Value &  args)
inline

Set the argument name and value.

Definition at line 35 of file timelineevent.h.

void TimelineNode::UpdateDuration ( const uint32  end)
inlineinherited

Update the duration of the event given a new end timestamp.

Definition at line 41 of file timelinenode.h.


The documentation for this class was generated from the following files: