Merge pull request #194 from dgarske/BenchmarkAddHeader
Added benchmark.h to expose the benchmark_test function. Updated a co…
This commit is contained in:
commit
a2915fbc57
@ -24,6 +24,7 @@
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
@ -34,11 +35,8 @@ typedef struct func_args {
|
||||
func_args args = { 0 } ;
|
||||
|
||||
extern double current_time(int reset) ;
|
||||
extern int benchmark_test(void *args) ;
|
||||
|
||||
main(void) {
|
||||
benchmark_test(&args) ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct func_args {
|
||||
@ -34,8 +35,7 @@ typedef struct func_args {
|
||||
|
||||
static func_args args = { 0 } ;
|
||||
|
||||
extern double current_time(int reset) ;
|
||||
extern int benchmark_test(void *args) ;
|
||||
extern double current_time(int reset);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -122,6 +122,7 @@
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
#include "wolfcrypt/benchmark/benchmark.h"
|
||||
|
||||
void bench_des(void);
|
||||
void bench_idea(void);
|
||||
|
32
wolfcrypt/benchmark/benchmark.h
Normal file
32
wolfcrypt/benchmark/benchmark.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* wolfcrypt/benchmark/benchmark.h
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int benchmark_test(void* args);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
@ -5,6 +5,7 @@ noinst_PROGRAMS += wolfcrypt/benchmark/benchmark
|
||||
wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c
|
||||
wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
||||
wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la
|
||||
noinst_HEADERS += wolfcrypt/benchmark/benchmark.h
|
||||
EXTRA_DIST += wolfcrypt/benchmark/benchmark.sln
|
||||
EXTRA_DIST += wolfcrypt/benchmark/benchmark.vcproj
|
||||
DISTCLEANFILES+= wolfcrypt/benchmark/.libs/benchmark
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* ctaocrypt/test/test.h
|
||||
/* wolfcrypt/test/test.h
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user