Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/testlib/qbenchmark_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4343#define QBENCHMARK_P_H
    4444
     45#include <stdlib.h>
     46
    4547//
    4648//  W A R N I N G
     
    6971#endif
    7072#include "QtTest/private/qbenchmarkevent_p.h"
     73#include "QtTest/private/qbenchmarkmetric_p.h"
    7174
    7275QT_BEGIN_NAMESPACE
     
    9396public:
    9497    QBenchmarkContext context;
    95     qint64 value;
     98    qreal value;
    9699    int iterations;
     100    QTest::QBenchmarkMetric metric;
     101    bool setByMacro;
    97102    bool valid;
    98103
     
    100105    : value(-1)
    101106    , iterations(-1)
     107    , setByMacro(true)
    102108    , valid(false)
    103     {  }
    104 
    105     QBenchmarkResult(const QBenchmarkContext &context, const qint64 value, const int iterations)
     109    { }
     110
     111    QBenchmarkResult(
     112        const QBenchmarkContext &context, const qreal value, const int iterations,
     113        QTest::QBenchmarkMetric metric, bool setByMacro)
    106114        : context(context)
    107115        , value(value)
    108116        , iterations(iterations)
     117        , metric(metric)
     118        , setByMacro(setByMacro)
    109119        , valid(true)
    110     {
    111     }
     120    { }
    112121
    113122    bool operator<(const QBenchmarkResult &other) const
     
    168177    bool resultsAccepted() const { return resultAccepted; }
    169178    int adjustIterationCount(int suggestion);
    170     void setResult(qint64 value);
     179    void setResult(qreal value, QTest::QBenchmarkMetric metric, bool setByMacro = true);
    171180
    172181    QBenchmarkResult result;
     
    184193
    185194    Q_TESTLIB_EXPORT void beginBenchmarkMeasurement();
    186     Q_TESTLIB_EXPORT qint64 endBenchmarkMeasurement();
    187 
    188     void setResult(qint64 result);
    189     void setResult(const QString &tag, qint64 result);
     195    Q_TESTLIB_EXPORT quint64 endBenchmarkMeasurement();
    190196}
    191197
Note: See TracChangeset for help on using the changeset viewer.