mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
*** empty log message ***
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@430 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
32545346df
commit
57f7562e92
@ -61,7 +61,7 @@ int SyntheticClient::run()
|
||||
{
|
||||
int iarg1 = iargs.front();
|
||||
iargs.pop_front();
|
||||
srand(time(0) + getpid());
|
||||
srand(time(0) + getpid() + client->whoami);
|
||||
sleep(rand() % iarg1);
|
||||
}
|
||||
break;
|
||||
@ -179,7 +179,7 @@ int SyntheticClient::run()
|
||||
{
|
||||
string prefix = get_sarg();
|
||||
int iarg1 = iargs.front(); iargs.pop_front();
|
||||
|
||||
|
||||
Trace t("traces/trace.openssh.lib");
|
||||
|
||||
client->mkdir(prefix.c_str(), 0755);
|
||||
|
@ -57,13 +57,13 @@ Trace::Trace(const char* f)
|
||||
cr.append(buf, r);
|
||||
}
|
||||
close(fd);
|
||||
|
||||
|
||||
// copy
|
||||
tl->len = cr.length()+1;
|
||||
tl->data = new char[cr.length()];
|
||||
tl->data = new char[tl->len];
|
||||
memcpy(tl->data, cr.c_str(), cr.length());
|
||||
tl->data[tl->len-1] = '\n';
|
||||
|
||||
|
||||
// index!
|
||||
int o = 0;
|
||||
while (o < tl->len) {
|
||||
@ -81,6 +81,7 @@ Trace::Trace(const char* f)
|
||||
dout(1) << "trace " << filename << " loaded with " << tl->tokens.size() << " tokens" << endl;
|
||||
traces[filename] = tl;
|
||||
}
|
||||
|
||||
tl->ref++;
|
||||
|
||||
trace_lock.Unlock();
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef __CLIENT_TRACE_H
|
||||
#define __CLIENT_TRACE_H
|
||||
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
@ -33,6 +34,7 @@ class Trace {
|
||||
char strings[10][200];
|
||||
int ns;
|
||||
const char *get_string(const char *prefix = 0) {
|
||||
assert(_cur != _end);
|
||||
const char *s = *_cur;
|
||||
_cur++;
|
||||
if (prefix) {
|
||||
|
Loading…
Reference in New Issue
Block a user