int main(int argc, char* argv[]) {

    //cout << "Usage: ./client <num_operations> <memberList> <configFile>"<< endl;
    /*	For BG/P:
    const string cmd = "cat /proc/personality.sh | grep BG_PSETORG";
    string torusID = executeShell(cmd);
    torusID.resize(torusID.size() - 1);
    int pid = getpid();
    unsigned int v = myhash(torusID.c_str(), 1000000) + pid;
    //cout<<"client: pid = "<<pid<<endl;

    //cout<<"Client random n = "<<v<<endl;
    srand(v);
    */

    char* isTCP = argv[4];
    //cout<<"Protocol = "<<isTCP<<endl;
    if (!strcmp("TCP", isTCP)) {
        TCP = true;
    } else {
        TCP = false;
    }

    int numOper = atoi(argv[1]);
    //cout<<"numOper = "<<numOper<<endl;
    string cfgFile(argv[3]);
    //cout<<"cfgFile = "<<cfgFile<<endl;
    string memberList(argv[2]);
    //cout<<"memberList: "<<memberList<<endl;
    vector<string> pkgList;
    ZHTClient testClient;
    //	int pid = getpid();
    char* tmpStr;
    stringstream ss; //create a stringstream
    //	ss << pid;

    //	string recordFile = "record." + ss.str();
    //	benchmarkTimeAnalize(cfgFile, memberList, pkgList, testClient, numOper, 15, recordFile);
    //cout<<"start to insert..."<<endl;
    insertMetadata(cfgFile, memberList, pkgList, testClient, numOper, 15); //25fro 128bytes.
    //cout << "Client:main, start lookup \n";
    benchmarkLookup(pkgList, testClient);
    benchmarkRemove(pkgList, testClient);
    testClient.tearDownTCP(TCP);
    return 0;
}
int c_zht_teardown_std(ZHTClient_c zhtClient) {

	ZHTClient * zhtcppClient = (ZHTClient *) zhtClient;

	return zhtcppClient->tearDownTCP();
}
int c_zht_teardown() {

	return zhtClient.tearDownTCP();
}