@@ -32,28 +32,59 @@ int main(int argc, char **argv)
3232 VCFParsingInterpreter* Interpreter = new VCFParsingInterpreter ();
3333
3434 Interpreter->InitializeFromPreloadedFile (argv[2 ]);
35+
36+ cout << " Structure size: " << Interpreter->GetSize ()/ (1024 * 1024 ) << " (MB)" << endl;
37+
38+ Interpreter->Index ->querytime_p1 = 0 ;
39+ Interpreter->Index ->querytime_p2 = 0 ;
40+ Interpreter->Index ->querytime_p3 = 0 ;
41+ Interpreter->Index ->querytime_p4 = 0 ;
42+ Interpreter->Index ->occs_a = 0 ;
43+ Interpreter->Index ->occs_b = 0 ;
44+ Interpreter->Index ->occs_c = 0 ;
3545 NanoTimer timer;
46+ double q_p1 = 0 , q_p2 = 0 , q_p3 = 0 , q_p4 = 0 ;
3647 string aux;
37- ll occ = 0 ;
48+ ll occ = 0 , occ_a = 0 , occ_b = 0 , occ_c = 0 ;
3849
3950 ifstream patterns_file (argv[1 ]);
4051
4152 cout << " Init pattern search of: " << argv[1 ] << endl;
4253
43- timer.reset ();
4454
4555 while (getline (patterns_file, aux))
4656 {
4757 occ += Interpreter->FindSnippetExperimental (aux);
58+ // Recover values
59+ q_p1 += Interpreter->Index ->querytime_p1 ;
60+ q_p2 += Interpreter->Index ->querytime_p2 ;
61+ q_p3 += Interpreter->Index ->querytime_p3 ;
62+ q_p4 += Interpreter->Index ->querytime_p4 ;
63+ occ_a += Interpreter->Index ->occs_a ;
64+ occ_b += Interpreter->Index ->occs_b ;
65+ occ_c += Interpreter->Index ->occs_c ;
66+
67+ Interpreter->Index ->querytime_p1 = 0 ;
68+ Interpreter->Index ->querytime_p2 = 0 ;
69+ Interpreter->Index ->querytime_p3 = 0 ;
70+ Interpreter->Index ->querytime_p4 = 0 ;
71+ Interpreter->Index ->occs_a = 0 ;
72+ Interpreter->Index ->occs_b = 0 ;
73+ Interpreter->Index ->occs_c = 0 ;
74+
4875 }
4976
50- double timeElapsed = timer.getMilisec ();
5177
5278 if (occ != 0 )
5379 {
54- cout << timeElapsed << " (ms)" << endl;
55- cout << occ << " (occurences)" << endl;
56- cout << (timeElapsed / occ) << " (real elapsed (ms))" << endl;
80+ cout << " [TT] " << q_p4 << endl;
81+ cout << " [T1] " << q_p1 << endl;
82+ cout << " [T2] " << q_p2 << endl;
83+ cout << " [T3] " << q_p3 << endl;
84+ cout << " [OT] " << occ << endl;
85+ cout << " [O1] " << occ_a << endl;
86+ cout << " [O2] " << occ_b << endl;
87+ cout << " [O3] " << occ_c << endl;
5788 }
5889
5990 cout << " Finished pattern search of: " << argv[1 ] << endl;
0 commit comments