|
|
@@ -0,0 +1,646 @@
|
|
|
+#
|
|
|
+# Autogenerated by Thrift Compiler (0.9.0)
|
|
|
+#
|
|
|
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
+#
|
|
|
+# options string: py
|
|
|
+#
|
|
|
+
|
|
|
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
|
|
|
+import Metrics.ttypes
|
|
|
+
|
|
|
+
|
|
|
+from thrift.transport import TTransport
|
|
|
+from thrift.protocol import TBinaryProtocol, TProtocol
|
|
|
+try:
|
|
|
+ from thrift.protocol import fastbinary
|
|
|
+except:
|
|
|
+ fastbinary = None
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+class TCounter:
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - name
|
|
|
+ - unit
|
|
|
+ - value
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'name', None, None, ), # 1
|
|
|
+ (2, TType.I32, 'unit', None, None, ), # 2
|
|
|
+ (3, TType.I64, 'value', None, None, ), # 3
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, name=None, unit=None, value=None,):
|
|
|
+ self.name = name
|
|
|
+ self.unit = unit
|
|
|
+ self.value = value
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.name = iprot.readString();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.unit = iprot.readI32();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.I64:
|
|
|
+ self.value = iprot.readI64();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TCounter')
|
|
|
+ if self.name is not None:
|
|
|
+ oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.name)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.unit is not None:
|
|
|
+ oprot.writeFieldBegin('unit', TType.I32, 2)
|
|
|
+ oprot.writeI32(self.unit)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.value is not None:
|
|
|
+ oprot.writeFieldBegin('value', TType.I64, 3)
|
|
|
+ oprot.writeI64(self.value)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.name is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field name is unset!')
|
|
|
+ if self.unit is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field unit is unset!')
|
|
|
+ if self.value is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field value is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TEventSequence:
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - name
|
|
|
+ - timestamps
|
|
|
+ - labels
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'name', None, None, ), # 1
|
|
|
+ (2, TType.LIST, 'timestamps', (TType.I64,None), None, ), # 2
|
|
|
+ (3, TType.LIST, 'labels', (TType.STRING,None), None, ), # 3
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, name=None, timestamps=None, labels=None,):
|
|
|
+ self.name = name
|
|
|
+ self.timestamps = timestamps
|
|
|
+ self.labels = labels
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.name = iprot.readString();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.timestamps = []
|
|
|
+ (_etype3, _size0) = iprot.readListBegin()
|
|
|
+ for _i4 in xrange(_size0):
|
|
|
+ _elem5 = iprot.readI64();
|
|
|
+ self.timestamps.append(_elem5)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.labels = []
|
|
|
+ (_etype9, _size6) = iprot.readListBegin()
|
|
|
+ for _i10 in xrange(_size6):
|
|
|
+ _elem11 = iprot.readString();
|
|
|
+ self.labels.append(_elem11)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TEventSequence')
|
|
|
+ if self.name is not None:
|
|
|
+ oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.name)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.timestamps is not None:
|
|
|
+ oprot.writeFieldBegin('timestamps', TType.LIST, 2)
|
|
|
+ oprot.writeListBegin(TType.I64, len(self.timestamps))
|
|
|
+ for iter12 in self.timestamps:
|
|
|
+ oprot.writeI64(iter12)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.labels is not None:
|
|
|
+ oprot.writeFieldBegin('labels', TType.LIST, 3)
|
|
|
+ oprot.writeListBegin(TType.STRING, len(self.labels))
|
|
|
+ for iter13 in self.labels:
|
|
|
+ oprot.writeString(iter13)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.name is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field name is unset!')
|
|
|
+ if self.timestamps is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field timestamps is unset!')
|
|
|
+ if self.labels is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field labels is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TTimeSeriesCounter:
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - name
|
|
|
+ - unit
|
|
|
+ - period_ms
|
|
|
+ - values
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'name', None, None, ), # 1
|
|
|
+ (2, TType.I32, 'unit', None, None, ), # 2
|
|
|
+ (3, TType.I32, 'period_ms', None, None, ), # 3
|
|
|
+ (4, TType.LIST, 'values', (TType.I64,None), None, ), # 4
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, name=None, unit=None, period_ms=None, values=None,):
|
|
|
+ self.name = name
|
|
|
+ self.unit = unit
|
|
|
+ self.period_ms = period_ms
|
|
|
+ self.values = values
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.name = iprot.readString();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.unit = iprot.readI32();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.period_ms = iprot.readI32();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.values = []
|
|
|
+ (_etype17, _size14) = iprot.readListBegin()
|
|
|
+ for _i18 in xrange(_size14):
|
|
|
+ _elem19 = iprot.readI64();
|
|
|
+ self.values.append(_elem19)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TTimeSeriesCounter')
|
|
|
+ if self.name is not None:
|
|
|
+ oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.name)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.unit is not None:
|
|
|
+ oprot.writeFieldBegin('unit', TType.I32, 2)
|
|
|
+ oprot.writeI32(self.unit)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.period_ms is not None:
|
|
|
+ oprot.writeFieldBegin('period_ms', TType.I32, 3)
|
|
|
+ oprot.writeI32(self.period_ms)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.values is not None:
|
|
|
+ oprot.writeFieldBegin('values', TType.LIST, 4)
|
|
|
+ oprot.writeListBegin(TType.I64, len(self.values))
|
|
|
+ for iter20 in self.values:
|
|
|
+ oprot.writeI64(iter20)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.name is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field name is unset!')
|
|
|
+ if self.unit is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field unit is unset!')
|
|
|
+ if self.period_ms is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field period_ms is unset!')
|
|
|
+ if self.values is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field values is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TRuntimeProfileNode:
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - name
|
|
|
+ - num_children
|
|
|
+ - counters
|
|
|
+ - metadata
|
|
|
+ - indent
|
|
|
+ - info_strings
|
|
|
+ - info_strings_display_order
|
|
|
+ - child_counters_map
|
|
|
+ - event_sequences
|
|
|
+ - time_series_counters
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'name', None, None, ), # 1
|
|
|
+ (2, TType.I32, 'num_children', None, None, ), # 2
|
|
|
+ (3, TType.LIST, 'counters', (TType.STRUCT,(TCounter, TCounter.thrift_spec)), None, ), # 3
|
|
|
+ (4, TType.I64, 'metadata', None, None, ), # 4
|
|
|
+ (5, TType.BOOL, 'indent', None, None, ), # 5
|
|
|
+ (6, TType.MAP, 'info_strings', (TType.STRING,None,TType.STRING,None), None, ), # 6
|
|
|
+ (7, TType.LIST, 'info_strings_display_order', (TType.STRING,None), None, ), # 7
|
|
|
+ (8, TType.MAP, 'child_counters_map', (TType.STRING,None,TType.SET,(TType.STRING,None)), None, ), # 8
|
|
|
+ (9, TType.LIST, 'event_sequences', (TType.STRUCT,(TEventSequence, TEventSequence.thrift_spec)), None, ), # 9
|
|
|
+ (10, TType.LIST, 'time_series_counters', (TType.STRUCT,(TTimeSeriesCounter, TTimeSeriesCounter.thrift_spec)), None, ), # 10
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, name=None, num_children=None, counters=None, metadata=None, indent=None, info_strings=None, info_strings_display_order=None, child_counters_map=None, event_sequences=None, time_series_counters=None,):
|
|
|
+ self.name = name
|
|
|
+ self.num_children = num_children
|
|
|
+ self.counters = counters
|
|
|
+ self.metadata = metadata
|
|
|
+ self.indent = indent
|
|
|
+ self.info_strings = info_strings
|
|
|
+ self.info_strings_display_order = info_strings_display_order
|
|
|
+ self.child_counters_map = child_counters_map
|
|
|
+ self.event_sequences = event_sequences
|
|
|
+ self.time_series_counters = time_series_counters
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.name = iprot.readString();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.num_children = iprot.readI32();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.counters = []
|
|
|
+ (_etype24, _size21) = iprot.readListBegin()
|
|
|
+ for _i25 in xrange(_size21):
|
|
|
+ _elem26 = TCounter()
|
|
|
+ _elem26.read(iprot)
|
|
|
+ self.counters.append(_elem26)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.I64:
|
|
|
+ self.metadata = iprot.readI64();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.BOOL:
|
|
|
+ self.indent = iprot.readBool();
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 6:
|
|
|
+ if ftype == TType.MAP:
|
|
|
+ self.info_strings = {}
|
|
|
+ (_ktype28, _vtype29, _size27 ) = iprot.readMapBegin()
|
|
|
+ for _i31 in xrange(_size27):
|
|
|
+ _key32 = iprot.readString();
|
|
|
+ _val33 = iprot.readString();
|
|
|
+ self.info_strings[_key32] = _val33
|
|
|
+ iprot.readMapEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 7:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.info_strings_display_order = []
|
|
|
+ (_etype37, _size34) = iprot.readListBegin()
|
|
|
+ for _i38 in xrange(_size34):
|
|
|
+ _elem39 = iprot.readString();
|
|
|
+ self.info_strings_display_order.append(_elem39)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 8:
|
|
|
+ if ftype == TType.MAP:
|
|
|
+ self.child_counters_map = {}
|
|
|
+ (_ktype41, _vtype42, _size40 ) = iprot.readMapBegin()
|
|
|
+ for _i44 in xrange(_size40):
|
|
|
+ _key45 = iprot.readString();
|
|
|
+ _val46 = set()
|
|
|
+ (_etype50, _size47) = iprot.readSetBegin()
|
|
|
+ for _i51 in xrange(_size47):
|
|
|
+ _elem52 = iprot.readString();
|
|
|
+ _val46.add(_elem52)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ self.child_counters_map[_key45] = _val46
|
|
|
+ iprot.readMapEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 9:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.event_sequences = []
|
|
|
+ (_etype56, _size53) = iprot.readListBegin()
|
|
|
+ for _i57 in xrange(_size53):
|
|
|
+ _elem58 = TEventSequence()
|
|
|
+ _elem58.read(iprot)
|
|
|
+ self.event_sequences.append(_elem58)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 10:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.time_series_counters = []
|
|
|
+ (_etype62, _size59) = iprot.readListBegin()
|
|
|
+ for _i63 in xrange(_size59):
|
|
|
+ _elem64 = TTimeSeriesCounter()
|
|
|
+ _elem64.read(iprot)
|
|
|
+ self.time_series_counters.append(_elem64)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TRuntimeProfileNode')
|
|
|
+ if self.name is not None:
|
|
|
+ oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.name)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.num_children is not None:
|
|
|
+ oprot.writeFieldBegin('num_children', TType.I32, 2)
|
|
|
+ oprot.writeI32(self.num_children)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.counters is not None:
|
|
|
+ oprot.writeFieldBegin('counters', TType.LIST, 3)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.counters))
|
|
|
+ for iter65 in self.counters:
|
|
|
+ iter65.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.metadata is not None:
|
|
|
+ oprot.writeFieldBegin('metadata', TType.I64, 4)
|
|
|
+ oprot.writeI64(self.metadata)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.indent is not None:
|
|
|
+ oprot.writeFieldBegin('indent', TType.BOOL, 5)
|
|
|
+ oprot.writeBool(self.indent)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.info_strings is not None:
|
|
|
+ oprot.writeFieldBegin('info_strings', TType.MAP, 6)
|
|
|
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.info_strings))
|
|
|
+ for kiter66,viter67 in self.info_strings.items():
|
|
|
+ oprot.writeString(kiter66)
|
|
|
+ oprot.writeString(viter67)
|
|
|
+ oprot.writeMapEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.info_strings_display_order is not None:
|
|
|
+ oprot.writeFieldBegin('info_strings_display_order', TType.LIST, 7)
|
|
|
+ oprot.writeListBegin(TType.STRING, len(self.info_strings_display_order))
|
|
|
+ for iter68 in self.info_strings_display_order:
|
|
|
+ oprot.writeString(iter68)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.child_counters_map is not None:
|
|
|
+ oprot.writeFieldBegin('child_counters_map', TType.MAP, 8)
|
|
|
+ oprot.writeMapBegin(TType.STRING, TType.SET, len(self.child_counters_map))
|
|
|
+ for kiter69,viter70 in self.child_counters_map.items():
|
|
|
+ oprot.writeString(kiter69)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(viter70))
|
|
|
+ for iter71 in viter70:
|
|
|
+ oprot.writeString(iter71)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeMapEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.event_sequences is not None:
|
|
|
+ oprot.writeFieldBegin('event_sequences', TType.LIST, 9)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.event_sequences))
|
|
|
+ for iter72 in self.event_sequences:
|
|
|
+ iter72.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.time_series_counters is not None:
|
|
|
+ oprot.writeFieldBegin('time_series_counters', TType.LIST, 10)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.time_series_counters))
|
|
|
+ for iter73 in self.time_series_counters:
|
|
|
+ iter73.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.name is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field name is unset!')
|
|
|
+ if self.num_children is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field num_children is unset!')
|
|
|
+ if self.counters is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field counters is unset!')
|
|
|
+ if self.metadata is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field metadata is unset!')
|
|
|
+ if self.indent is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field indent is unset!')
|
|
|
+ if self.info_strings is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field info_strings is unset!')
|
|
|
+ if self.info_strings_display_order is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field info_strings_display_order is unset!')
|
|
|
+ if self.child_counters_map is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field child_counters_map is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TRuntimeProfileTree:
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - nodes
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.LIST, 'nodes', (TType.STRUCT,(TRuntimeProfileNode, TRuntimeProfileNode.thrift_spec)), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, nodes=None,):
|
|
|
+ self.nodes = nodes
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.nodes = []
|
|
|
+ (_etype77, _size74) = iprot.readListBegin()
|
|
|
+ for _i78 in xrange(_size74):
|
|
|
+ _elem79 = TRuntimeProfileNode()
|
|
|
+ _elem79.read(iprot)
|
|
|
+ self.nodes.append(_elem79)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TRuntimeProfileTree')
|
|
|
+ if self.nodes is not None:
|
|
|
+ oprot.writeFieldBegin('nodes', TType.LIST, 1)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.nodes))
|
|
|
+ for iter80 in self.nodes:
|
|
|
+ iter80.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.nodes is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field nodes is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|