Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: src/platform/vboot_reference/tests/kernel_verify_benchmark.c

Issue 1456002: Fix benchmark output label. (Closed)
Patch Set: . Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Timing benchmark for verifying a firmware image. 5 * Timing benchmark for verifying a firmware image.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 StopTimer(&ct); 117 StopTimer(&ct);
118 msecs = (float) GetDurationMsecs(&ct) / NUM_OPERATIONS; 118 msecs = (float) GetDurationMsecs(&ct) / NUM_OPERATIONS;
119 fprintf(stderr, 119 fprintf(stderr,
120 "# Kernel (%s, Algo = %s / %s):" 120 "# Kernel (%s, Algo = %s / %s):"
121 "\t%.02f ms/verification\n", 121 "\t%.02f ms/verification\n",
122 g_kernel_size_labels[i], 122 g_kernel_size_labels[i],
123 algo_strings[firmware_sign_algorithm], 123 algo_strings[firmware_sign_algorithm],
124 algo_strings[kernel_sign_algorithm], 124 algo_strings[kernel_sign_algorithm],
125 msecs); 125 msecs);
126 fprintf(stdout, "ms_firmware_%s_rsa%d_%s_rsa%d_%s:%.02f\n", 126 fprintf(stdout, "ms_kernel_%s_rsa%d_%s_rsa%d_%s:%.02f\n",
127 g_kernel_size_labels[i], 127 g_kernel_size_labels[i],
128 firmware_key_size, 128 firmware_key_size,
129 sha_strings[firmware_sign_algorithm], 129 sha_strings[firmware_sign_algorithm],
130 kernel_key_size, 130 kernel_key_size,
131 sha_strings[kernel_sign_algorithm], 131 sha_strings[kernel_sign_algorithm],
132 msecs); 132 msecs);
133 } 133 }
134 134
135 cleanup: 135 cleanup:
136 for (i = 0; i < NUM_SIZES_TO_TEST; ++i) 136 for (i = 0; i < NUM_SIZES_TO_TEST; ++i)
(...skipping 13 matching lines...) Expand all
150 if (siglen_map[j] > siglen_map[i]) 150 if (siglen_map[j] > siglen_map[i])
151 continue; 151 continue;
152 if (siglen_map[j] == siglen_map[i] && hash_size_map[j] > hash_size_map[i]) 152 if (siglen_map[j] == siglen_map[i] && hash_size_map[j] > hash_size_map[i])
153 continue; 153 continue;
154 if (0 != (error_code = SpeedTestAlgorithm(i, j))) 154 if (0 != (error_code = SpeedTestAlgorithm(i, j)))
155 return error_code; 155 return error_code;
156 } 156 }
157 } 157 }
158 return 0; 158 return 0;
159 } 159 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698