Lines Matching refs:json_ctx
51 do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, in do_one_test() argument
69 json_element_double (json_ctx, (double) cur / i); in do_one_test()
73 do_test (json_ctx_t *json_ctx, size_t len, int overlap, int both_ways) in do_test() argument
87 json_element_object_begin (json_ctx); in do_test()
88 json_attr_uint (json_ctx, "length", (double) len); in do_test()
89 json_attr_string(json_ctx, "overlap", in do_test()
93 json_attr_uint (json_ctx, "dst > src", (double) (s2 > s1)); in do_test()
94 json_array_begin (json_ctx, "timings"); in do_test()
98 do_one_test (json_ctx, impl, (char *) buf2, (char *) buf1, len); in do_test()
100 json_array_end (json_ctx); in do_test()
101 json_element_object_end (json_ctx); in do_test()
112 json_ctx_t json_ctx; in test_main() local
116 json_init (&json_ctx, 0, stdout); in test_main()
118 json_document_begin (&json_ctx); in test_main()
119 json_attr_string (&json_ctx, "timing_type", TIMING_TYPE); in test_main()
121 json_attr_object_begin (&json_ctx, "functions"); in test_main()
122 json_attr_object_begin (&json_ctx, "memmove"); in test_main()
123 json_attr_string (&json_ctx, "bench-variant", "walk"); in test_main()
125 json_array_begin (&json_ctx, "ifuncs"); in test_main()
127 json_element_string (&json_ctx, impl->name); in test_main()
128 json_array_end (&json_ctx); in test_main()
130 json_array_begin (&json_ctx, "results"); in test_main()
134 do_test (&json_ctx, i, NO_OVERLAP, 1); in test_main()
135 do_test (&json_ctx, i + 1, NO_OVERLAP, 1); in test_main()
141 do_test (&json_ctx, i, PARTIAL_OVERLAP, 1); in test_main()
142 do_test (&json_ctx, i + 1, PARTIAL_OVERLAP, 1); in test_main()
148 do_test (&json_ctx, i, COMPLETE_OVERLAP, 0); in test_main()
149 do_test (&json_ctx, i + 1, COMPLETE_OVERLAP, 0); in test_main()
152 json_array_end (&json_ctx); in test_main()
153 json_attr_object_end (&json_ctx); in test_main()
154 json_attr_object_end (&json_ctx); in test_main()
155 json_document_end (&json_ctx); in test_main()