original_docstring: Takes raw tracelog dict and computes ts stats
docstring: Takes raw tracelog dict and computes ts stats
docstring_tokens: Takes raw tracelog dict and computes ts stats
code: def _assemble_ts_stats(self):
          """Takes raw tracelog dict and computes ts stats"""
  
          # make a dict subkey
          self.tracelog['trace_ts']['stats']
  
          for k, v in self.tracelog['trace_ts'].iteritems():
             
              # messages received
              if 'tscHandleMsgDirectly' in v:
                 
                  try:
                      msg = v['tscHandleMsgDirectly']['msg']
                      fromwho = v['tscHandleMsgDirectly']['node_ip']
  
                      if not msg in self.tracelog['trace_ts']['stats']['received']:
                          self.tracelog['trace_ts']['stats']['received'][msg] = []
  
                      self.tracelog['trace_ts']['stats']['received'][msg].append(fromwho)
                  except Exception as e:
                      print "Exception in 'received', '{0}'".format(e)
                      continue
  
              if 'tscHandleMsg' in v:
                  try:
                      msg = v['tscHandleMsg']['msg']
                      fromwho = v['tscHandleMsg']['node_ip']
  
                      if not msg in self.tracelog['trace_ts']['stats']['received']:
                          self.tracelog['trace_ts']['stats']['received'][msg] = []
  
                      self.tracelog['trace_ts']['stats']['received'][msg].append(fromwho)
                  except Exception as e:
                      print "Exception in 'received', '{0}'".format(e)
                      continue
  
              # messages sent
              if 'sendMessage' in v:
  
                  try:
                      # need the 'msg' field from the tscSend operation
                      if 'msg' in v['tscSend']:
                          msg = v['tscSend']['msg']
                      else:
                          msg = v['tscSendReply']['msg']
  
                      towho = v['sendMessage']['node_ip']
  
                      if not msg in self.tracelog['trace_ts']['stats']['sent']:
                          self.tracelog['trace_ts']['stats']['sent'][msg] = []
  
                      self.tracelog['trace_ts']['stats']['sent'][msg].append(towho)
                  except Exception as e:
                      print "Exception in 'sent', '{0}'".format(e)
                      continue
          return
code_tokens: def _assemble_ts_stats ( self ) : self . tracelog [ 'trace_ts' ] [ 'stats' ] for k , v in self . tracelog [ 'trace_ts' ] . iteritems ( ) : if 'tscHandleMsgDirectly' in v : try : msg = v [ 'tscHandleMsgDirectly' ] [ 'msg' ] fromwho = v [ 'tscHandleMsgDirectly' ] [ 'node_ip' ] if not msg in self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] : self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] [ msg ] = [ ] self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] [ msg ] . append ( fromwho ) except Exception as e : print "Exception in 'received', '{0}'" . format ( e ) continue if 'tscHandleMsg' in v : try : msg = v [ 'tscHandleMsg' ] [ 'msg' ] fromwho = v [ 'tscHandleMsg' ] [ 'node_ip' ] if not msg in self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] : self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] [ msg ] = [ ] self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'received' ] [ msg ] . append ( fromwho ) except Exception as e : print "Exception in 'received', '{0}'" . format ( e ) continue if 'sendMessage' in v : try : if 'msg' in v [ 'tscSend' ] : msg = v [ 'tscSend' ] [ 'msg' ] else : msg = v [ 'tscSendReply' ] [ 'msg' ] towho = v [ 'sendMessage' ] [ 'node_ip' ] if not msg in self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'sent' ] : self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'sent' ] [ msg ] = [ ] self . tracelog [ 'trace_ts' ] [ 'stats' ] [ 'sent' ] [ msg ] . append ( towho ) except Exception as e : print "Exception in 'sent', '{0}'" . format ( e ) continue return
short_docstring: Takes raw tracelog dict and computes ts stats
short_docstring_tokens: Takes raw tracelog dict and computes ts stats
comment: """Takes raw tracelog dict and computes ts stats"""$SEP$# make a dict subkey$SEP$# messages received$SEP$# messages sent$SEP$# need the 'msg' field from the tscSend operation