Changeset 1042 for SHX/trunk


Ignore:
Timestamp:
08.12.2015 07:58:37 (5 years ago)
Author:
klaus
Message:

disabled ArgsInfo? storage in a list (hopefully not needed here) due to severe slowdown after creating/deleting hundreds of traces; for same reason delete topics without listeners; changed debug output in some routines

Location:
SHX/trunk/SeismicHandler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/basics/messages.py

    r934 r1042  
    5454        msgs.unsubscribe(receiver, msgid) 
    5555 
     56    runtime_a = time.time() 
    5657    msgid = "gR%s" % uuid.uuid4().hex 
     58    runtime_0 = time.time() 
    5759    msgs.subscribe(receiver, msgid) 
     60    runtime_b = time.time() 
    5861    topic = msgs.getTopic(msgid) 
     62    runtime_c = time.time() 
    5963 
    6064    msgs.sendMessage("getruntime", name=name, msgid=msgid) 
     65    runtime_d = time.time() 
    6166 
    6267    # waiting for receiver drop out of topic 
    6368    while topic.getListeners(): 
    6469        time.sleep(0.01) 
     70    runtime_e = time.time() 
    6571 
     72    #print "runtime runtimevar %s %g 0: %g w: %g x: %g y: %g z: %g" % (name, 
     73    #    (runtime_e-runtime_a),(runtime_0-runtime_a),(runtime_b-runtime_0),(runtime_c-runtime_b), 
     74    #    (runtime_d-runtime_c),(runtime_e-runtime_d)) 
    6675    return hive.pop(msgid) 
    6776 
  • SHX/trunk/SeismicHandler/commands/create.py

    r1038 r1042  
    1616#    along with SHX.  If not, see <http://www.gnu.org/licenses/>. 
    1717 
    18 import time 
    1918from SeismicHandler.basics.command import BaseCommand 
    2019from SeismicHandler.basics.error import ShxError 
     
    10099 
    101100    def run(self): 
    102         runtime_a = time.time() 
    103101        try: 
    104102            _type = self.parameters[0].lower() 
     
    219217 
    220218        # call library method 
    221         runtime_b = time.time() 
    222219        try: 
    223220            method(*parameters) 
    224221        except Exception, e: 
    225222            raise ShxError("library call failed: %s", e) 
    226         runtime_c = time.time() 
    227223 
    228224        # construct obspy.trace 
     
    233229            } 
    234230        ) 
    235         runtime_d = time.time() 
    236231        add_traces(t) 
    237         runtime_e = time.time() 
    238         print "runtime create %g m: %g t: %g a: %g" % ((runtime_d-runtime_a), 
    239             (runtime_c-runtime_b),(runtime_d-runtime_c),(runtime_e-runtime_d)) 
    240232 
    241233 
  • SHX/trunk/SeismicHandler/commands/filter_.py

    r1038 r1042  
    8787        add_traces(newtraces) 
    8888        runtime_b = time.time() 
    89         print "runtime filter %g" % (runtime_b-runtime_a) 
     89        #print "runtime filter %g" % (runtime_b-runtime_a) 
    9090 
    9191    @staticmethod 
Note: See TracChangeset for help on using the changeset viewer.