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

Function parse_xml_benchmark

lib_acl/samples/xml/xml6/xml.c:152–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static 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
176static int parse_xml_file(const char *filepath)
177{

Callers 1

mainFunction · 0.70

Calls 4

acl_xml3_allocFunction · 0.85
acl_xml3_slashFunction · 0.85
acl_xml3_resetFunction · 0.85
acl_xml3_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…