source: trunk/FACT++/dim/src/benchmark/benchServer.cxx@ 13710

Last change on this file since 13710 was 11071, checked in by tbretz, 13 years ago
Replaced v19r21 by a version extracted with 'unzip -a' to get proper unix text format.
File size: 676 bytes
Line 
1#include <iostream>
2#include <dis.hxx>
3#ifdef WIN32
4#include <process.h>
5#endif
6
7int main(int argc, char *argv[])
8{
9 int i, msgSize, nServices, pid;
10 char *msg, servName[64];
11 DimService **services;
12
13 sscanf(argv[1],"%d",&msgSize);
14 sscanf(argv[2],"%d",&nServices);
15 msg = new char[msgSize];
16 services = new DimService*[nServices];
17
18 pid = getpid();
19 for(i = 0; i < nServices; i++)
20 {
21 sprintf(servName,"BENCH_SERVICE_%d_%03d",pid, i);
22 services[i] = new DimService(servName, "C", msg, msgSize);
23 }
24 sprintf(servName,"BENCH_%d",pid);
25 DimServer::start(servName);
26 while(1)
27 {
28 for(i = 0; i < nServices; i++)
29 {
30 services[i]->updateService();
31 }
32 }
33 return 0;
34}
Note: See TracBrowser for help on using the repository browser.