Exemple #1
0
    def collectDataForCombinedGraphics(self, startTime, endTime, types):
        """
        
            @summary : Returns a list of one ClientStatsPicklers
                       instance wich contains the combined data
                       of all the individual graphics.
                       
            @return : Returns a list of ONE ClientStatsPicklers
            
        """

        dataCollection = []


        statsCollection = PickleMerging.mergePicklesFromDifferentSources( logger = None , startTime = startTime, endTime = endTime,\
                                                                          clients = self.clientNames, fileType = self.fileType,\
                                                                          machines =  self.machines, groupName = self.groupName )

        combinedMachineName = ""
        combinedMachineName = combinedMachineName.join(
            [machine for machine in self.machines])

        #Verifier params utiliser par cette ligne
        dataCollection.append( StatsPickler( client = self.clientNames, statsTypes = types, directory = self.directory,\
                                             statsCollection = statsCollection, machine = combinedMachineName,\
                                             logger = None, logging = False ) )

        return dataCollection
def getMergedData( clients, fileType,  machines, startTime, endTime, groupName = "", logger = None ):
    """
        This method returns all data comprised between startTime and endTime as 
        to be able to build pairs.
           
    """
    
    if fileType == "tx":       
        types = [ "errors","bytecount","latency", ]
    else:
        types = [ "errors","bytecount" ]
    
    #print startTime, endTime
    if len( machines ) > 1 or len( clients) > 1:   
        
        statsCollection = PickleMerging.mergePicklesFromDifferentSources( logger = logger , startTime = startTime, endTime = endTime, clients = clients, fileType = fileType, machines = machines, groupName = groupName )                           
    
    else:#only one machine, only merge different hours together
       
        statsCollection = PickleMerging.mergePicklesFromDifferentHours( logger = logger , startTime = startTime, endTime = endTime, client = clients[0], fileType = fileType, machine = machines[0] )
        
    
    combinedMachineName = ""
    for machine in machines:
        combinedMachineName = combinedMachineName + machine
    
       
    dataCollector =  StatsPickler( client = clients[0], statsTypes = types, directory = "", statsCollection = statsCollection, machine = combinedMachineName, logger = logger )
    
    return dataCollector    
 def collectDataForCombinedGraphics( self, startTime, endTime, types ):
     """
     
         @summary : Returns a list of one ClientStatsPicklers
                    instance wich contains the combined data
                    of all the individual graphics.
                    
         @return : Returns a list of ONE ClientStatsPicklers
         
     """         
     
     dataCollection = []        
     
     
     statsCollection = PickleMerging.mergePicklesFromDifferentSources( logger = None , startTime = startTime, endTime = endTime,\
                                                                       clients = self.clientNames, fileType = self.fileType,\
                                                                       machines =  self.machines, groupName = self.groupName )
     
     combinedMachineName = ""
     combinedMachineName = combinedMachineName.join( [machine for machine in self.machines])
             
     #Verifier params utiliser par cette ligne
     dataCollection.append( StatsPickler( client = self.clientNames, statsTypes = types, directory = self.directory,\
                                          statsCollection = statsCollection, machine = combinedMachineName,\
                                          logger = None, logging = False ) )
     
     return dataCollection
Exemple #4
0
def getMergedData(clients,
                  fileType,
                  machines,
                  startTime,
                  endTime,
                  groupName="",
                  logger=None):
    """
        This method returns all data comprised between startTime and endTime as 
        to be able to build pairs.
           
    """

    if fileType == "tx":
        types = [
            "errors",
            "bytecount",
            "latency",
        ]
    else:
        types = ["errors", "bytecount"]

    #print startTime, endTime
    if len(machines) > 1 or len(clients) > 1:

        statsCollection = PickleMerging.mergePicklesFromDifferentSources(
            logger=logger,
            startTime=startTime,
            endTime=endTime,
            clients=clients,
            fileType=fileType,
            machines=machines,
            groupName=groupName)

    else:  #only one machine, only merge different hours together

        statsCollection = PickleMerging.mergePicklesFromDifferentHours(
            logger=logger,
            startTime=startTime,
            endTime=endTime,
            client=clients[0],
            fileType=fileType,
            machine=machines[0])

    combinedMachineName = ""
    for machine in machines:
        combinedMachineName = combinedMachineName + machine

    dataCollector = StatsPickler(client=clients[0],
                                 statsTypes=types,
                                 directory="",
                                 statsCollection=statsCollection,
                                 machine=combinedMachineName,
                                 logger=logger)

    return dataCollector
Exemple #5
0
    def collectDataForIndividualGraphics(self, startTime, endTime, types):
        #find parameters
        """
            @summary : Returns a list of ClientStatsPicklers
                       instances, each of wich contains data
                       for all the individual graphics.
            
            @return : List of ClientStatsPicklers instances.
            
        """

        global _

        dataCollection = []

        for client in self.clientNames:  #

            #Gather data from all previously created pickles....
            if self.logger != None:
                try:
                    self.logger.debug(_("Call to mergeHourlyPickles."))
                    self.logger.debug(
                        _("Parameters used : %s %s %s") %
                        (startTime, endTime, client))
                except:
                    pass

            if len(self.machines) > 1:
                clientArray = []
                clientArray.append(client)
                statsCollection = PickleMerging.mergePicklesFromDifferentSources( logger = None , startTime = startTime, endTime = endTime,\
                                                                                  clients = clientArray, fileType = self.fileType,\
                                                                                  machines = self.machines, groupName = self.groupName  )

            else:  #only one machine, only merge different hours together

                statsCollection = PickleMerging.mergePicklesFromDifferentHours( logger = None , startTime = startTime, endTime = endTime,\
                                                                                client = client, fileType = self.fileType, machine = self.machines[0] )

            combinedMachineName = ""
            combinedMachineName = combinedMachineName.join(
                [machine for machine in self.machines])

            dataCollection.append( StatsPickler( client = self.clientNames, statsTypes = types, directory = self.directory,\
                                                 statsCollection = statsCollection, machine = combinedMachineName,\
                                                 logger = None, logging =False  ) )

        return dataCollection
 def collectDataForIndividualGraphics( self, startTime, endTime, types ):
     #find parameters
     
     """
         @summary : Returns a list of ClientStatsPicklers
                    instances, each of wich contains data
                    for all the individual graphics.
         
         @return : List of ClientStatsPicklers instances.
         
     """
     
     global _ 
     
     dataCollection = []         
      
     for client in self.clientNames : # 
            
         #Gather data from all previously created pickles....      
         if self.logger != None :  
             try:               
                 self.logger.debug( _("Call to mergeHourlyPickles." ) )
                 self.logger.debug( _("Parameters used : %s %s %s") %( startTime, endTime, client ) )
             except:
                 pass
                 
         if len( self.machines ) > 1 :   
             clientArray = []
             clientArray.append(client) 
             statsCollection = PickleMerging.mergePicklesFromDifferentSources( logger = None , startTime = startTime, endTime = endTime,\
                                                                               clients = clientArray, fileType = self.fileType,\
                                                                               machines = self.machines, groupName = self.groupName  )
                                 
         else:#only one machine, only merge different hours together
            
             statsCollection = PickleMerging.mergePicklesFromDifferentHours( logger = None , startTime = startTime, endTime = endTime,\
                                                                             client = client, fileType = self.fileType, machine = self.machines[0] )
             
         
         combinedMachineName = ""
         combinedMachineName = combinedMachineName.join( [ machine for machine in self.machines] )
             
         dataCollection.append( StatsPickler( client = self.clientNames, statsTypes = types, directory = self.directory,\
                                              statsCollection = statsCollection, machine = combinedMachineName,\
                                              logger = None, logging =False  ) )
                         
     
     return dataCollection