more benchmark result

This commit is contained in:
c9s 2014-05-23 11:47:10 +08:00
parent 52fd5979c0
commit 7d16413cb3
3 changed files with 16 additions and 11 deletions

View file

@ -456,3 +456,6 @@
1400816448,9260790.48,2131479.91,55188.21 1400816448,9260790.48,2131479.91,55188.21
1400816458,9303957.38,2110797.39,55924.05 1400816458,9303957.38,2110797.39,55924.05
1400816525,9330370.85,1985782.06,59074.70 1400816525,9330370.85,1985782.06,59074.70
1400816594,9389101.94,1989498.64,34663.67
1400816645,9201251.49,2105517.01,43240.25
1400816815,9228390.29,2097606.06,23301.69

Can't render this file because it has a wrong number of fields in line 447.

View file

@ -270,12 +270,12 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
int ov[ ov_cnt ]; int ov[ ov_cnt ];
rc = pcre_exec( rc = pcre_exec(
n->pcre_pattern, /* the compiled pattern */ n->pcre_pattern, /* the compiled pattern */
n->pcre_extra, n->pcre_extra,
path, /* the subject string */ path, /* the subject string */
path_len, /* the length of the subject */ path_len, /* the length of the subject */
0, /* start at offset 0 in the subject */ 0, /* start at offset 0 in the subject */
0, /* default options */ 0, /* default options */
ov, /* output vector for substring information */ ov, /* output vector for substring information */
ov_cnt); /* number of elements in the output vector */ ov_cnt); /* number of elements in the output vector */
@ -283,11 +283,14 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
if (rc < 0) { if (rc < 0) {
switch(rc) switch(rc)
{ {
case PCRE_ERROR_NOMATCH: printf("pcre: no match\n"); break; case PCRE_ERROR_NOMATCH:
/* printf("pcre: no match '%s' on pattern '%s'\n", path, n->combined_pattern);
Handle other special cases if you like break;
*/
default: printf("pcre matching error '%d' on pattern '%s'\n", rc, n->combined_pattern); break; // Handle other special cases if you like
default:
printf("pcre matching error '%d' '%s' on pattern '%s'\n", rc, path, n->combined_pattern);
break;
} }
// does not match all edges, return NULL; // does not match all edges, return NULL;
return NULL; return NULL;

View file

@ -165,7 +165,6 @@ START_TEST (test_pcre_patterns_insert_3)
matched = r3_tree_match(n, "/post/11", NULL); matched = r3_tree_match(n, "/post/11", NULL);
ck_assert(!matched); ck_assert(!matched);
matched = r3_tree_match(n, "/post/11/", NULL); matched = r3_tree_match(n, "/post/11/", NULL);
ck_assert(!matched); ck_assert(!matched);