From a0ff47699b490e857db18dffd4fbc3e8003bf732 Mon Sep 17 00:00:00 2001 From: anwleung Date: Sat, 31 Mar 2007 05:38:01 +0000 Subject: [PATCH] added 2 more workloads git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1328 29311d96-e01e-0410-9327-a35deaab8ce9 --- .../security1/ceph/client/SyntheticClient.cc | 77 ++++++++++++++++++- .../security1/ceph/client/SyntheticClient.h | 2 + 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/branches/aleung/security1/ceph/client/SyntheticClient.cc b/branches/aleung/security1/ceph/client/SyntheticClient.cc index fa44490cc52b2..d34a757608592 100644 --- a/branches/aleung/security1/ceph/client/SyntheticClient.cc +++ b/branches/aleung/security1/ceph/client/SyntheticClient.cc @@ -57,6 +57,12 @@ void parse_syn_options(vector& args) } else if (strcmp(args[i],"ior") == 0) { syn_modes.push_back( SYNCLIENT_MODE_IOR2 ); syn_iargs.push_back( atoi(args[++i]) ); + } else if (strcmp(args[i],"mixed") == 0) { + syn_modes.push_back( SYNCLIENT_MODE_MIXED ); + syn_iargs.push_back( atoi(args[++i]) ); + } else if (strcmp(args[i],"renewal") == 0) { + syn_modes.push_back( SYNCLIENT_MODE_RENEWAL ); + syn_iargs.push_back( atoi(args[++i]) ); } else if (strcmp(args[i],"wrshared") == 0) { syn_modes.push_back( SYNCLIENT_MODE_WRSHARED ); syn_iargs.push_back( atoi(args[++i]) ); @@ -412,10 +418,10 @@ int SyntheticClient::run() cout << "Setup trace:" << setupfile << endl; // choose random IOR2 file to open - //int randf = rand() % 500; + int filenum = rand() % 500; // cant be trace 0, its broken - //randf++; - int filenum = client->whoami + 1; + filenum++; + //int filenum = client->whoami + 1; ostringstream ost; ost << "IOR2/IOR_trace_fileperproc.p" << filenum << "t.cephtrace"; @@ -443,6 +449,71 @@ int SyntheticClient::run() } break; + case SYNCLIENT_MODE_MIXED: + { + string shared1 = "/shared1"; + string shared2 = "/shared2"; + string shared3 = "/shared3"; + string shared4 = "/shared4"; + string shared5 = "/shared5"; + string shared6 = "/shared6"; + + string personal1 = get_sarg(0); + string personal2 = get_sarg(1); + string personal3 = get_sarg(2); + string personal4 = get_sarg(3); + + int iterations = iargs.front(); iargs.pop_front(); + + int size = 10; + int inc = 128*1024; + + if (run_me()) { + + for (int i=0; i