Lines Matching refs:json_ctx
49 do_one_test (json_ctx_t *json_ctx, impl_t *impl, const CHAR *s, size_t exp_len) in do_one_test() argument
71 json_element_double (json_ctx, (double) cur / (double) iters); in do_one_test()
75 do_test (json_ctx_t *json_ctx, size_t align, size_t len) in do_test() argument
83 json_element_object_begin (json_ctx); in do_test()
84 json_attr_uint (json_ctx, "length", len); in do_test()
85 json_attr_uint (json_ctx, "alignment", align); in do_test()
86 json_array_begin (json_ctx, "timings"); in do_test()
97 do_one_test (json_ctx, impl, (CHAR *) (buf + align), len); in do_test()
101 json_array_end (json_ctx); in do_test()
102 json_element_object_end (json_ctx); in do_test()
108 json_ctx_t json_ctx; in test_main() local
113 json_init (&json_ctx, 0, stdout); in test_main()
115 json_document_begin (&json_ctx); in test_main()
116 json_attr_string (&json_ctx, "timing_type", TIMING_TYPE); in test_main()
118 json_attr_object_begin (&json_ctx, "functions"); in test_main()
119 json_attr_object_begin (&json_ctx, TEST_NAME); in test_main()
120 json_attr_string (&json_ctx, "bench-variant", ""); in test_main()
122 json_array_begin (&json_ctx, "ifuncs"); in test_main()
124 json_element_string (&json_ctx, impl->name); in test_main()
125 json_array_end (&json_ctx); in test_main()
127 json_array_begin (&json_ctx, "results"); in test_main()
132 do_test (&json_ctx, sizeof (CHAR) * i, i); in test_main()
133 do_test (&json_ctx, 0, i); in test_main()
138 do_test (&json_ctx, 0, 1 << i); in test_main()
139 do_test (&json_ctx, sizeof (CHAR) * 7, 1 << i); in test_main()
140 do_test (&json_ctx, sizeof (CHAR) * i, 1 << i); in test_main()
141 do_test (&json_ctx, sizeof (CHAR) * i, (size_t)((1 << i) / 1.5)); in test_main()
144 json_array_end (&json_ctx); in test_main()
145 json_attr_object_end (&json_ctx); in test_main()
146 json_attr_object_end (&json_ctx); in test_main()
147 json_document_end (&json_ctx); in test_main()