utils/bench-simulator.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 20 Oct 2006 14:17:03 +0200
changeset 131 f4fb87e77034
parent 122 6b8f1eda5c57
child 143 552ff26b4224
permissions -rw-r--r--
change emacs mode to new NS3 elisp mode
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
131
f4fb87e77034 change emacs mode to new NS3 elisp mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 122
diff changeset
     1
/* -*- Mode:NS3; -*- */
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2006 INRIA
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 * All rights reserved.
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 * published by the Free Software Foundation;
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 * GNU General Public License for more details.
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 *
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
 */
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
14
6dd7d31c6fc3 replace yans include with ns3 include
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 12
diff changeset
    22
#include "ns3/simulator.h"
34
f2aa05303e7c remove more unused files, rename system files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 25
diff changeset
    23
#include "ns3/system-wall-clock-ms.h"
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include <iostream>
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include <fstream>
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include <vector>
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
16
99e833adbb46 change yans namespace to ns3
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 14
diff changeset
    28
using namespace ns3;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
53
ae406f4957d5 variable/method/function coding style update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 38
diff changeset
    31
bool gDebug = false;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
class Bench {
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
public:
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    35
    void ReadDistribution (std::istream &istream);
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    36
    void SetTotal (uint32_t total);
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    37
    void RunBench (void);
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
private:
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    39
    void Cb (void);
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    40
    std::vector<uint64_t> m_distribution;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    41
    std::vector<uint64_t>::const_iterator m_current;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    42
    uint32_t m_n;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    43
    uint32_t m_total;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
};
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
void 
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    47
Bench::SetTotal (uint32_t total)
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    48
{
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    49
    m_total = total;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    50
}
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    51
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    52
void
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    53
Bench::ReadDistribution (std::istream &input)
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
{
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    55
    double data;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    56
    while (!input.eof ()) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    57
        if (input >> data) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    58
            uint64_t ns = (uint64_t) (data * 1000000000);
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    59
            m_distribution.push_back (ns);
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    60
        } else {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    61
            input.clear ();
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    62
            std::string line;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    63
            input >> line;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    64
        }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    65
    }
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
}
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
void
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    69
Bench::RunBench (void) 
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
{
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    71
    SystemWallClockMs time;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    72
    double init, simu;
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    73
    time.Start ();
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    74
    for (std::vector<uint64_t>::const_iterator i = m_distribution.begin ();
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    75
         i != m_distribution.end (); i++) {
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    76
        Simulator::Schedule (Time::AbsNs (*i), &Bench::Cb, this);
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    77
    }
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    78
    init = time.End ();
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    79
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    80
    m_current = m_distribution.begin ();
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    82
    time.Start ();
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    83
    Simulator::Run ();
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    84
    simu = time.End ();
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    85
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    86
    std::cout <<
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    87
        "init n=" << m_distribution.size () << ", time=" << init << "s" << std::endl <<
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    88
        "simu n=" << m_n << ", time=" <<simu << "s" << std::endl <<
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    89
        "init " << ((double)m_distribution.size ()) / init << " insert/s, avg insert=" <<
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    90
        init / ((double)m_distribution.size ())<< "s" << std::endl <<
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    91
        "simu " << ((double)m_n) / simu<< " hold/s, avg hold=" << 
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    92
        simu / ((double)m_n) << "s" << std::endl
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    93
        ;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    94
}
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    95
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
void
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
    97
Bench::Cb (void)
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    98
{
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
    99
    if (m_n > m_total) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   100
        return;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   101
    }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   102
    if (m_current == m_distribution.end ()) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   103
        m_current = m_distribution.begin ();
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   104
    }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   105
    if (gDebug) {
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   106
        std::cerr << "event at " << Simulator::Now ().S () << "s" << std::endl;
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   107
    }
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   108
    Simulator::Schedule (Time::AbsNs (*m_current), &Bench::Cb, this);
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   109
    m_current++;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   110
    m_n++;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   111
}
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   112
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   113
int main (int argc, char *argv[])
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   114
{
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   115
    char const *filename = argv[1];
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   116
    std::istream *input;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   117
    argc-=2;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   118
    argv+= 2;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   119
    if (strcmp (filename, "-") == 0) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   120
        input = &std::cin;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   121
    } else {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   122
        input = new std::ifstream (filename);
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   123
    }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   124
    while (argc > 0) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   125
        if (strcmp ("--list", argv[0]) == 0) {
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   126
            Simulator::SetLinkedList ();
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   127
        } else if (strcmp ("--heap", argv[0]) == 0) {
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   128
            Simulator::SetBinaryHeap ();
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   129
        } else if (strcmp ("--map", argv[0]) == 0) {
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   130
            Simulator::SetStdMap ();
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   131
        } else if (strcmp ("--debug", argv[0]) == 0) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   132
            gDebug = true;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   133
        } else if (strncmp ("--log=", argv[0],strlen ("--log=")) == 0) {
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   134
            char const *filename = argv[0] + strlen ("--log=");
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   135
            Simulator::EnableLogTo (filename);
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   136
        }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   137
        argc--;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   138
        argv++;
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   139
    }
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   140
    Bench *bench = new Bench ();
122
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   141
    bench->ReadDistribution (*input);
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   142
    bench->SetTotal (20000);
6b8f1eda5c57 fix coding style
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 110
diff changeset
   143
    bench->RunBench ();
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
54
f860e6f94787 change indent to be 4 spaces
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 53
diff changeset
   145
    return 0;
12
917ba023c576 utils and samples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
}