| 150 | } |
| 151 | |
| 152 | static void parse_xml_benchmark(int max, const char *data) |
| 153 | { |
| 154 | int i; |
| 155 | ACL_XML3 *xml = acl_xml3_alloc(); |
| 156 | |
| 157 | acl_xml3_slash(xml, 1); |
| 158 | |
| 159 | ACL_METER_TIME("-------------bat begin--------------"); |
| 160 | for (i = 0; i < max; i++) { |
| 161 | char *ptr = acl_mystrdup(data); |
| 162 | acl_xml3_parse(xml, ptr); |
| 163 | acl_myfree(ptr); |
| 164 | acl_xml3_reset(xml); |
| 165 | } |
| 166 | |
| 167 | ACL_METER_TIME("-------------bat end--------------"); |
| 168 | acl_xml3_free(xml); |
| 169 | |
| 170 | printf("--------------benchmark_max: %d--------------\r\n", max); |
| 171 | |
| 172 | printf("Enter any key to continue ...\r\n"); |
| 173 | getchar(); |
| 174 | } |
| 175 | |
| 176 | static int parse_xml_file(const char *filepath) |
| 177 | { |
no test coverage detected
searching dependent graphs…