MCPcopy Create free account
hub / github.com/acl-dev/acl / main

Function main

lib_acl_cpp/samples/benchmark/split/main.cpp:104–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104int main(int argc, char* argv[]) {
105 int ch;
106
107 while ((ch = getopt(argc, argv, "hn:")) > 0) {
108 switch (ch) {
109 case 'h':
110 usage(argv[0]);
111 return 0;
112 case 'n':
113 max = atoi(optarg);
114 if (max < 100) {
115 max = 100;
116 }
117 break;
118 default:
119 usage(argv[0]);
120 return 0;
121 }
122 }
123
124 //////////////////////////////////////////////////////////////////////
125
126 struct timeval begin, end;
127
128 //////////////////////////////////////////////////////////////////////
129
130 gettimeofday(&begin, NULL);
131 test1();
132 gettimeofday(&end, NULL);
133
134 double tc = util::stamp_sub(&end, &begin);
135 printf("Test1 time cost: %.2f ms\r\n", tc);
136 printf("--------------------------------------------------------\r\n");
137
138 //////////////////////////////////////////////////////////////////////
139
140 gettimeofday(&begin, NULL);
141 test2();
142 gettimeofday(&end, NULL);
143
144 tc = util::stamp_sub(&end, &begin);
145 printf("Test2 time cost: %.2f ms\r\n", tc);
146 printf("--------------------------------------------------------\r\n");
147
148 //////////////////////////////////////////////////////////////////////
149
150 gettimeofday(&begin, NULL);
151 test3();
152 gettimeofday(&end, NULL);
153
154 tc = util::stamp_sub(&end, &begin);
155 printf("Test3 time cost: %.2f ms\r\n", tc);
156 printf("--------------------------------------------------------\r\n");
157
158 //////////////////////////////////////////////////////////////////////
159
160 gettimeofday(&begin, NULL);
161 test4();

Callers

nothing calls this directly

Calls 10

usageFunction · 0.70
test1Function · 0.70
test2Function · 0.70
test3Function · 0.70
test4Function · 0.70
test5Function · 0.70
getoptFunction · 0.50
gettimeofdayFunction · 0.50
stamp_subFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…