コード例 #1
0
ファイル: benchmarksuite.cpp プロジェクト: dcoeurjo/appleseed
    static double measure_runtime_seconds(
        IBenchmarkCase*         benchmark,
        StopwatchType&          stopwatch)
    {
        stopwatch.start();
        benchmark->run();
        stopwatch.measure();

        return stopwatch.get_seconds();
    }
コード例 #2
0
ファイル: benchmarksuite.cpp プロジェクト: dcoeurjo/appleseed
    static double measure_runtime_ticks(
        IBenchmarkCase*         benchmark,
        StopwatchType&          stopwatch)
    {
        stopwatch.start();
        benchmark->run();
        stopwatch.measure();

        return static_cast<double>(stopwatch.get_ticks());
    }
コード例 #3
0
ファイル: benchmarksuite.cpp プロジェクト: Lorenz25/appleseed
    static double measure_runtime_seconds(
        IBenchmarkCase*         benchmark,
        StopwatchType&          stopwatch,
        const size_t            iteration_count)
    {
        stopwatch.start();

        for (size_t i = 0; i < iteration_count; ++i)
            benchmark->run();

        stopwatch.measure();

        return stopwatch.get_seconds();
    }