Changeset d5caf79 in mainline for uspace/app/perf/ipc/ping_pong.c


Ignore:
Timestamp:
2018-12-28T13:56:05Z (5 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
980611d5
Parents:
c7de81b
git-author:
Vojtech Horky <vojtech.horky@…> (2018-12-28 13:54:23)
git-committer:
Vojtech Horky <vojtech.horky@…> (2018-12-28 13:56:05)
Message:

perf: hide more benchmark implementation

It is much easier to maintain the benchmark if all the definitions etc.
are in a single file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/perf/ipc/ping_pong.c

    rc7de81b rd5caf79  
    3232#include <errno.h>
    3333#include <str_error.h>
     34#include "../benchlist.h"
    3435#include "../perf.h"
    3536
    3637static ipc_test_t *test = NULL;
    3738
    38 bool bench_ping_pong_setup(char *error, size_t error_size)
     39static bool setup(char *error, size_t error_size)
    3940{
    4041        errno_t rc = ipc_test_create(&test);
     
    4950}
    5051
    51 bool bench_ping_pong_teardown(char *error, size_t error_size)
     52static bool teardown(char *error, size_t error_size)
    5253{
    5354        ipc_test_destroy(test);
     
    5556}
    5657
    57 bool bench_ping_pong(stopwatch_t *stopwatch, uint64_t niter,
     58static bool runner(stopwatch_t *stopwatch, uint64_t niter,
    5859    char *error, size_t error_size)
    5960{
     
    7576        return true;
    7677}
     78
     79benchmark_t bench_ping_pong = {
     80        .name = "ping_pong",
     81        .desc = "IPC ping-pong benchmark",
     82        .entry = &runner,
     83        .setup = &setup,
     84        .teardown = &teardown
     85};
Note: See TracChangeset for help on using the changeset viewer.