@@ -61,22 +61,30 @@ def test_performance(self):
6161class TestTraceLengthTime (TestCase ):
6262 def setUp (self ):
6363 self .label = LabelContainer (NO_LABEL )
64+ start_time = time .time ()
65+ self .log1 = get_logs ("log_cache/Sepsis Cases - Event Log.xes.gz" )[0 ]
66+ print ("Total for %s %s seconds" % ("sepsis" , time .time () - start_time ))
67+ start_time = time .time ()
68+ self .log2 = get_logs ("log_cache/financial_log.xes.gz" )[0 ]
69+ print ("Total for %s %s seconds" % ("financial" , time .time () - start_time ))
70+ start_time = time .time ()
71+ self .log3 = get_logs ("log_cache/BPI Challenge 2017.xes.gz" )[0 ]
72+ print ("Total for %s %s seconds" % ("2017" , time .time () - start_time ))
6473
65- def do_test (self , encoding , log_path ):
74+ def do_test (self , encoding , log ):
6675 start_time = time .time ()
67- log = get_logs (log_path )[0 ]
76+ # log = get_logs(log_path)[0]
6877 add_col = get_global_event_attributes (log )
6978 event_names = unique_events (log )
7079 encoding = EncodingContainer (encoding , prefix_length = 20 , padding = ZERO_PADDING )
7180 log = encode_label_log (log , encoding , REGRESSION , self .label , event_names = event_names ,
7281 additional_columns = add_col )
7382 print (log .shape )
74- print ("Total %s for %s %s seconds" % (log_path , encoding .method , time .time () - start_time ))
83+ print ("Total for %s %s seconds" % (encoding .method , time .time () - start_time ))
7584
7685 def test_performance (self ):
7786 encs = [SIMPLE_INDEX , BOOLEAN , FREQUENCY , COMPLEX , LAST_PAYLOAD ]
78- logs = ["log_cache/Sepsis Cases - Event Log.xes.gz" , "log_cache/financial_log.xes.gz" ,
79- "log_cache/BPI Challenge 2017.xes.gz" ]
87+ logs = [self .log3 ]
8088 for l in logs :
8189 for e in encs :
8290 self .do_test (e , l )
0 commit comments