Changeset d5a89a3 in mainline for uspace/app/hbench/benchlist.c


Ignore:
Timestamp:
2019-02-11T22:31:04Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
aaf9789c
Parents:
e3272101 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merging with upstream/master

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/hbench/benchlist.c

    re3272101 rd5a89a3  
    11/*
    22 * Copyright (c) 2018 Jiri Svoboda
     3 * Copyright (c) 2018 Vojtech Horky
    34 * All rights reserved.
    45 *
     
    2728 */
    2829
    29 /** @addtogroup perf
     30/** @addtogroup hbench
    3031 * @{
    3132 */
    32 /** @file
     33/**
     34 * @file
    3335 */
    3436
    35 #ifndef PERF_H_
    36 #define PERF_H_
     37#include <stdlib.h>
     38#include "hbench.h"
    3739
    38 #include <stdbool.h>
     40benchmark_t *benchmarks[] = {
     41        &benchmark_dir_read,
     42        &benchmark_fibril_mutex,
     43        &benchmark_file_read,
     44        &benchmark_malloc1,
     45        &benchmark_malloc2,
     46        &benchmark_ns_ping,
     47        &benchmark_ping_pong
     48};
    3949
    40 typedef const char *(*benchmark_entry_t)(void);
    41 
    42 typedef struct {
    43         const char *name;
    44         const char *desc;
    45         benchmark_entry_t entry;
    46 } benchmark_t;
    47 
    48 extern const char *bench_malloc1(void);
    49 extern const char *bench_malloc2(void);
    50 extern const char *bench_ns_ping(void);
    51 extern const char *bench_ping_pong(void);
    52 
    53 extern benchmark_t benchmarks[];
    54 
    55 #endif
     50size_t benchmark_count = sizeof(benchmarks) / sizeof(benchmarks[0]);
    5651
    5752/** @}
Note: See TracChangeset for help on using the changeset viewer.