[project @ 12]
[mussa.git] / mussa_test.cc
1 #include "mussa_class.hh"
2 #include "time.h"
3
4 int main(int argc, char **argv) 
5 {
6   Mussa overlord;
7   char * para_file, * ana_file;
8   string  an_arg;
9   time_t t1, t2, begin, end;
10   double setuptime, seqloadtime, seqcomptime, nwaytime, savetime, totaltime;
11   string run_mode;
12   int seq_num;
13
14
15   begin = time(NULL);
16
17   // need more sophisticated arg reading structure
18   // support -w and -t override options...other stuff??
19   an_arg = * ++argv;
20
21   if (an_arg == "-v")
22   {
23     ana_file = * ++argv;
24     run_mode = "v";
25   }
26   else
27   {
28     para_file = (char*) an_arg.c_str();
29     run_mode = "f";
30   }
31
32   if (run_mode == "v")
33   {
34     cout << "load file = " << ana_file << endl;
35     overlord.load(ana_file);
36     //overlord.FuckingPieceOfShit(1000,500);
37   }
38   else if (run_mode == "f")
39   {
40     t1 = time(NULL);
41     overlord.setup(para_file);
42     t2 = time(NULL);
43     setuptime = difftime(t2, t1);
44
45
46     cout << "fee\n";
47     t1 = time(NULL);
48     overlord.get_Seqs();
49     t2 = time(NULL);
50     seqloadtime = difftime(t2, t1);
51
52
53     cout << "fie\n";
54     t1 = time(NULL);
55     overlord.seqcomp();
56     t2 = time(NULL);
57     seqcomptime = difftime(t2, t1);
58
59
60     cout << "foe\n";
61     t1 = time(NULL);
62     overlord.nway();
63     t2 = time(NULL);
64     nwaytime = difftime(t2, t1);
65
66
67     cout << "fum\n";
68     t1 = time(NULL);
69     overlord.save_old();
70     t2 = time(NULL);
71     savetime = difftime(t2, t1);
72
73     end = time(NULL);
74     totaltime = difftime(end, begin);
75
76     cout << "setup\tseqload\tseqcomp\tnway\tsave\ttotal\n";
77     cout << setuptime << "\t"; 
78     cout << seqloadtime << "\t";
79     cout << seqcomptime << "\t";
80     cout << nwaytime << "\t";
81     cout << savetime << "\t";
82     cout << totaltime << "\n";
83   }
84 }
85
86
87
88
89 /*
90       cout << "fee\n";
91       cout << "fie\n";
92       cout << "foe\n";
93       cout << "fum\n";
94 */