aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-08-03 18:51:27 +0000
committerFranklin Wei <me@fwei.tk>2018-08-03 18:51:27 +0000
commit15c809cc72125c149a56eaaa67b6fd546e2302ae (patch)
treea80852bff9d77c0b40ae949fd6c8b7012486def9
parente33211c2bd96994e6da361239ed8714b8cea32c0 (diff)
downloadcsaa-15c809cc72125c149a56eaaa67b6fd546e2302ae.zip
csaa-15c809cc72125c149a56eaaa67b6fd546e2302ae.tar.gz
csaa-15c809cc72125c149a56eaaa67b6fd546e2302ae.tar.bz2
csaa-15c809cc72125c149a56eaaa67b6fd546e2302ae.tar.xz
Adapt dummy service and client for new profiling method
This moves the profiling code to crypto.c (which should probably be renamed util.c at some point). Test scripts and data processing scripts have been updated as well to deal with the new data.
-rw-r--r--client.c42
-rw-r--r--crypto.c50
-rw-r--r--crypto.h24
-rw-r--r--dummy_client.c56
-rw-r--r--dummy_service.c18
-rwxr-xr-xgenlabels.sh17
-rwxr-xr-xgraph.gnu55
-rw-r--r--service_provider.c28
-rw-r--r--service_provider.h11
-rwxr-xr-xtabulate.sh37
-rwxr-xr-xtestdummy_preinit.sh6
11 files changed, 245 insertions, 99 deletions
diff --git a/client.c b/client.c
index 53e3aad..4f3a0c3 100644
--- a/client.c
+++ b/client.c
@@ -398,13 +398,6 @@ static bool verify_sp_ack(int fd, const struct tm_request *tmr)
return verify_ack(tmr, userkey, strlen(userkey), hmac);
}
-/* hack to avoid copy-pasta below */
-static void read_profile(int fd, struct server_profile *profile_out)
-{
- if(profile_out)
- recv(fd, profile_out, sizeof(*profile_out), MSG_WAITALL);
-}
-
/* In case of modifcation or file creation, returns true on successful
* completion of request, as acknowledged by module. In case of info
* retrieval, returns true if version info is verified by module. The
@@ -478,7 +471,7 @@ bool exec_request(int fd, const struct user_request *req,
success = verify_sp_ack(fd, &tmr);
if(req->profile)
- read_profile(fd, profile_out);
+ prof_read(fd, profile_out);
break;
}
@@ -507,7 +500,7 @@ bool exec_request(int fd, const struct user_request *req,
success = false;
if(req->profile)
- read_profile(fd, profile_out);
+ prof_read(fd, profile_out);
break;
}
case RETRIEVE_FILE:
@@ -531,7 +524,7 @@ bool exec_request(int fd, const struct user_request *req,
*composefile = deserialize_file(fd, cf_len_out);
if(req->profile)
- read_profile(fd, profile_out);
+ prof_read(fd, profile_out);
success = *file_contents_out != NULL;
@@ -605,33 +598,6 @@ int connect_to_service(const char *sockpath)
return fd;
}
-/* The test scripts depend on the output of this function with -p set
- * (labels = false, labels_only = false). Do not change! */
-void prof_dump(struct server_profile *profile, bool labels)
-{
- //for(int i = 0; i < profile->n_times; ++i)
- //fprintf(stderr, "%s ", profile->labels[i]);
- //fprintf(stderr, "\n");
-
- clock_t sum = 0;
-
- /* TODO: use partial sums? */
- for(int i = 1; i < profile->n_times; ++i)
- {
- if(labels || labels_only)
- fprintf(stderr, "%s%s", profile->labels[i], !labels_only ? " " : "\n");
-
- if(!labels_only)
- fprintf(stderr, "%ld%c", profile->times[i] - profile->times[i - 1],
- (!labels && !labels_only) ? ' ' : '\n');
-
- sum += profile->times[i] - profile->times[i - 1];
- }
-
- if(!labels && !labels_only)
- fprintf(stderr, "\n");
-}
-
bool server_request(const char *sockpath,
const char *user_key, uint64_t user_id,
struct user_request req,
@@ -802,7 +768,7 @@ bool server_request(const char *sockpath,
if(req.profile)
{
/* dump to stderr */
- prof_dump(&profile, labels);
+ prof_dump(&profile, labels, labels_only);
}
return success;
diff --git a/crypto.c b/crypto.c
index 21ca87a..eae8fb8 100644
--- a/crypto.c
+++ b/crypto.c
@@ -524,6 +524,56 @@ void write_file(const char *path, const void *contents, size_t len)
}
}
+/* Profiling */
+void prof_reset(struct server_profile *prof)
+{
+ memset(prof, 0, sizeof(*prof));
+}
+
+void prof_add(struct server_profile *prof, const char *label)
+{
+ if(prof->n_times < MAX_TIMES)
+ {
+ prof->times[prof->n_times] = clock();
+ strcpy(prof->labels[prof->n_times], label);
+
+ prof->n_times++;
+ }
+}
+
+/* The test scripts depend on the output of this function with -p set
+ * (labels = false, labels_only = false). Do not change! */
+void prof_dump(struct server_profile *profile, bool labels, bool labels_only)
+{
+ //for(int i = 0; i < profile->n_times; ++i)
+ //fprintf(stderr, "%s ", profile->labels[i]);
+ //fprintf(stderr, "\n");
+
+ clock_t sum = 0;
+
+ /* TODO: use partial sums? */
+ for(int i = 1; i < profile->n_times; ++i)
+ {
+ if(labels || labels_only)
+ fprintf(stderr, "%s%s", profile->labels[i], !labels_only ? " " : "\n");
+
+ if(!labels_only)
+ fprintf(stderr, "%ld%c", profile->times[i] - profile->times[i - 1],
+ (!labels && !labels_only) ? ' ' : '\n');
+
+ sum += profile->times[i] - profile->times[i - 1];
+ }
+
+ if(!labels && !labels_only)
+ fprintf(stderr, "\n");
+}
+
+void prof_read(int fd, struct server_profile *profile_out)
+{
+ if(profile_out)
+ recv(fd, profile_out, sizeof(*profile_out), MSG_WAITALL);
+}
+
void crypto_test(void)
{
#if 0
diff --git a/crypto.h b/crypto.h
index 19fc15f..bdb4618 100644
--- a/crypto.h
+++ b/crypto.h
@@ -3,11 +3,15 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
+#include <time.h>
struct tm_request;
struct version_info;
-/* Various useful cryptographic functions; shared between TM and SP. */
+/* Various useful cryptographic functions; shared between TM and SP.
+ * This has also grown to include some decidely non-cryptographic
+ * functions, namely profiling code and file I/O helpers, which are
+ * shared with the client code as well. */
/* we use SHA256 for h() */
typedef struct hash_t {
@@ -113,6 +117,24 @@ void write_file(const char *path, const void *contents, size_t len);
void warn(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
+/* profiling */
+
+#define MAX_TIMES 30
+#define MAX_LABEL 40
+
+/* this struct records a series of clock() times, and labels for them */
+struct server_profile {
+ clock_t times[MAX_TIMES];
+ char labels[MAX_TIMES][MAX_LABEL];
+
+ int n_times;
+};
+
+void prof_reset(struct server_profile *prof);
+void prof_add(struct server_profile *prof, const char *label);
+void prof_dump(struct server_profile *profile, bool labels, bool labels_only);
+void prof_read(int fd, struct server_profile *profile_out);
+
/* self-test */
void crypto_test(void);
#endif
diff --git a/dummy_client.c b/dummy_client.c
index 2530c4a..2033471 100644
--- a/dummy_client.c
+++ b/dummy_client.c
@@ -35,6 +35,7 @@ static const char *parse_args_fail = NULL;
static uint64_t user_id = 0;
static struct user_request cl_request;
const char *image_path = NULL;
+static bool labels = false, labels_only = false;
void print_usage(const char *name)
{
@@ -114,6 +115,18 @@ bool parse_args(int argc, char *argv[])
print_usage(argv[0]);
exit(1);
}
+ else if(!strcmp(arg, "-p") || !strcmp(arg, "--profile"))
+ {
+ cl_request.profile = true;
+ }
+ else if(!strcmp(arg, "-l") || !strcmp(arg, "--labels"))
+ {
+ labels = true;
+ }
+ else if(!strcmp(arg, "--labels-only"))
+ {
+ labels_only = true;
+ }
else if(!strcmp(arg, "create"))
{
if(cl_request.type != USERREQ_NONE)
@@ -201,7 +214,8 @@ bool exec_request(int fd, const struct user_request *req,
struct version_info *verinfo_out, /* RETRIEVE_INFO only */
void **file_contents_out, /* RETRIEVE_FILE only */
size_t *file_len, /* RETRIEVE_FILE only */
- uint64_t *new_idx) /* CREATE_FILE only */
+ uint64_t *new_idx, /* CREATE_FILE only */
+ struct server_profile *profile_out) /* profile=true only */
{
write(fd, req, sizeof(*req));
/* write additional data */
@@ -220,18 +234,27 @@ bool exec_request(int fd, const struct user_request *req,
break;
}
+ /* server now processes request */
+
switch(req->type)
{
case CREATE_FILE:
{
if(new_idx)
recv(fd, new_idx, sizeof(*new_idx), MSG_WAITALL);
+
+ if(req->profile)
+ prof_read(fd, profile_out);
+
return true;
}
case MODIFY_ACL:
case MODIFY_FILE:
{
/* don't verify */
+ if(req->profile)
+ prof_read(fd, profile_out);
+
return true;
}
case RETRIEVE_INFO:
@@ -239,22 +262,18 @@ bool exec_request(int fd, const struct user_request *req,
struct version_info verinfo;
recv(fd, &verinfo, sizeof(verinfo), MSG_WAITALL);
*verinfo_out = verinfo;
+ if(req->profile)
+ prof_read(fd, profile_out);
+
return true;
}
case RETRIEVE_FILE:
{
- recv(fd, file_len, sizeof(*file_len), MSG_WAITALL);
+ *file_contents_out = deserialize_file(fd, file_len);
+
+ if(req->profile)
+ prof_read(fd, profile_out);
- if(*file_len)
- {
- *file_contents_out = malloc(*file_len);
- recv(fd, *file_contents_out, *file_len, MSG_WAITALL);
- }
- else
- {
- *file_contents_out = NULL;
- return false;
- }
return true;
}
default:
@@ -280,7 +299,8 @@ struct version_info request_verinfo(int fd, uint64_t user_id,
&verinfo,
NULL,
NULL,
- NULL);
+ NULL,
+ NULL);
return verinfo;
}
@@ -332,6 +352,7 @@ bool server_request(const char *sockpath,
}
struct version_info verinfo;
+ struct server_profile profile;
int fd = connect_to_service(sockpath);
uint64_t new_idx;
@@ -342,7 +363,8 @@ bool server_request(const char *sockpath,
req.type == RETRIEVE_INFO ? &verinfo : NULL,
req.type == RETRIEVE_FILE ? &file_contents : NULL,
req.type == RETRIEVE_FILE ? &file_len : NULL,
- req.type == CREATE_FILE ? &new_idx : NULL);
+ req.type == CREATE_FILE ? &new_idx : NULL,
+ req.profile ? &profile : NULL);
printf("Request %s\n",
success ?
@@ -371,6 +393,12 @@ bool server_request(const char *sockpath,
default:
break;
}
+
+ if(req.profile)
+ {
+ /* dump to stderr */
+ prof_dump(&profile, labels, labels_only);
+ }
return true;
}
diff --git a/dummy_service.c b/dummy_service.c
index 9964b9d..c34e7ac 100644
--- a/dummy_service.c
+++ b/dummy_service.c
@@ -45,6 +45,8 @@ struct service_provider {
void *db; /* sqlite3 handle */
sqlite3_stmt *lookup_record, *insert_record, *update_record, *max_record;
+
+ struct server_profile profile;
};
/* write to file data_dir/file_idx/version */
@@ -178,7 +180,6 @@ void sp_free(struct service_provider *sp)
}
}
-/* linear search for record given idx */
static struct file_record *lookup_record(struct service_provider *sp, uint64_t idx)
{
sqlite3_stmt *st = sp->lookup_record;
@@ -200,10 +201,6 @@ static struct file_record *lookup_record(struct service_provider *sp, uint64_t i
return NULL;
}
-/* Should we insert sorted (for O(logn) lookup), or just at the end to
- * avoid copying (O(n) lookup, O(1) insertion)? Eventually this will
- * be replaced with a SQL backend. We do not check to ensure that
- * there are no duplicate file indices; that is up to the caller. */
static void insert_record(struct service_provider *sp, const struct file_record *rec)
{
sqlite3_stmt *st = sp->insert_record;
@@ -409,6 +406,12 @@ static void sp_handle_client(struct service_provider *sp, int cl)
if(recv(cl, &user_req, sizeof(user_req), MSG_WAITALL) != sizeof(user_req))
return;
+ if(user_req.profile)
+ prof_reset(&sp->profile);
+
+ /* logging is unconditional */
+ prof_add(&sp->profile, "start");
+
switch(user_req.type)
{
case CREATE_FILE:
@@ -467,6 +470,11 @@ static void sp_handle_client(struct service_provider *sp, int cl)
exit(1);
}
}
+
+ prof_add(&sp->profile, "end");
+
+ if(user_req.profile)
+ write(cl, &sp->profile, sizeof(sp->profile));
}
static void sp_prepopulate(int logleaves, const char *dbpath)
diff --git a/genlabels.sh b/genlabels.sh
index 0fbd3a1..754fe7d 100755
--- a/genlabels.sh
+++ b/genlabels.sh
@@ -16,3 +16,20 @@ sleep .2
kill -SIGINT $pid
rm csaa.db
+
+# dummy
+echo "Initializing..."
+rm files -rf
+
+./dummy_server 10 csaa.db --overwrite > /dev/null &
+pid=$!
+sleep .2
+
+# the three operations should have the same labels no matter if
+# they're encrypted or not
+./dummy_client -u 1 -k a create -p --labels-only 2> dummy_labels_0_create.txt
+./dummy_client -u 1 -k a modifyfile -f 1 -i container1/hello-world.tar -p --labels-only 2> dummy_labels_1_modify.txt
+./dummy_client -u 1 -k a retrievefile -f 1 -o out -p --labels-only 2> dummy_labels_2_retrieve.txt
+
+kill -SIGINT $pid
+rm csaa.db
diff --git a/graph.gnu b/graph.gnu
index 08a0d9e..de97719 100755
--- a/graph.gnu
+++ b/graph.gnu
@@ -6,7 +6,7 @@ set yrange [0:2000]
set style line 1 lc rgb '#0060ad' lt 1 lw 2 pt -1 ps 0
set style line 3 pt -1 ps 0
-set terminal eps size 6in,6in font "LiberationSerif"
+set terminal eps size 6in,10in font "LiberationSerif"
create_times = "`wc -l labels_0_create.txt`"
modify_times = "`wc -l labels_1_modify.txt`"
@@ -16,32 +16,85 @@ create_labels = "`cat labels_0_create.txt | tr "\n" " "`"
modify_labels = "`cat labels_1_modify.txt | tr "\n" " "`"
retrieve_labels = "`cat labels_2_retrieve.txt | tr "\n" " "`"
+dummy_create_times = "`wc -l dummy_labels_0_create.txt`"
+dummy_modify_times = "`wc -l dummy_labels_1_modify.txt`"
+dummy_retrieve_times = "`wc -l dummy_labels_2_retrieve.txt`"
+
+dummy_create_labels = "`cat dummy_labels_0_create.txt | tr "\n" " "`"
+dummy_modify_labels = "`cat dummy_labels_1_modify.txt | tr "\n" " "`"
+dummy_retrieve_labels = "`cat dummy_labels_2_retrieve.txt | tr "\n" " "`"
+
+
+
set output "graph_create.eps"
#set terminal qt 0
+set multiplot layout 2, 1 title "Create Performance"
+
+set title "Authenticated"
+
plot for[i=3 * create_times - 1:2:-3] '< paste results/final_data_0_*.txt' u 1:(sum [col=2:i] column(col)) title 'Create '.word(create_labels, (i+1) / 3) w filledcurves x1, \
for[i=3 * create_times - 1:2:-3] '< paste results/final_data_0_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+set title "Dummy"
+
+plot for[i=3 * dummy_create_times - 1:2:-3] '< paste results/final_dummy_data_0_*.txt' u 1:(sum [col=2:i] column(col)) title 'Create '.word(dummy_create_labels, (i+1) / 3) w filledcurves x1, \
+ for[i=3 * dummy_create_times - 1:2:-3] '< paste results/final_dummy_data_0_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+
+unset multiplot
+
+
+
set output "graph_modify.eps"
#set terminal qt 1
+set multiplot layout 2, 1 title "Modify Performance"
+
+set title "Authenticated"
+
plot for[i=3 * modify_times - 1:2:-3] '< paste results/final_data_1_*.txt' u 1:(sum [col=2:i] column(col)) title 'Modify '.word(modify_labels, (i+1) / 3) w filledcurves x1, \
for[i=3 * modify_times - 1:2:-3] '< paste results/final_data_1_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+set title "Dummy"
+
+plot for[i=3 * dummy_modify_times - 1:2:-3] '< paste results/final_dummy_data_1_*.txt' u 1:(sum [col=2:i] column(col)) title 'Modify '.word(dummy_modify_labels, (i+1) / 3) w filledcurves x1, \
+ for[i=3 * dummy_modify_times - 1:2:-3] '< paste results/final_dummy_data_1_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+
+unset multiplot
+
+
+
set output "graph_retrieve.eps"
#set terminal qt 2
+set multiplot layout 2, 1 title "Retrieve Performance"
+
+set title "Authenticated"
+
plot for[i=3 * retrieve_times - 1:2:-3] '< paste results/final_data_2_*.txt' u 1:(sum [col=2:i] column(col)) title 'Retrieve '.word(retrieve_labels, (i+1) / 3) w filledcurves x1, \
for[i=3 * retrieve_times - 1:2:-3] '< paste results/final_data_2_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+set title "Dummy"
+
+plot for[i=3 * dummy_retrieve_times - 1:2:-3] '< paste results/final_dummy_data_2_*.txt' u 1:(sum [col=2:i] column(col)) title 'Retrieve '.word(dummy_retrieve_labels, (i+1) / 3) w filledcurves x1, \
+ for[i=3 * dummy_retrieve_times - 1:2:-3] '< paste results/final_dummy_data_2_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
+
+unset multiplot
+
+
+
set output "graph_modifyenc.eps"
#set terminal qt 3
+set title "Authenticated Encrypted Modify Performance"
+
plot for[i=3 * modify_times - 1:2:-3] '< paste results/final_data_3_*.txt' u 1:(sum [col=2:i] column(col)) title 'Encrypted modify '.word(modify_labels, (i+1) / 3) w filledcurves x1, \
for[i=3 * modify_times - 1:2:-3] '< paste results/final_data_3_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
set output "graph_retrieveenc.eps"
#set terminal qt 4
+set title "Authenticated Encrypted Retrieve Performance"
+
plot for[i=3 * retrieve_times - 1:2:-3] '< paste results/final_data_4_*.txt' u 1:(sum [col=2:i] column(col)) title 'Encrypted retrieve '.word(retrieve_labels, (i+1) / 3) w filledcurves x1, \
for[i=3 * retrieve_times - 1:2:-3] '< paste results/final_data_4_*.txt' u 1:(sum [col=2:i] column(col)):i+1 title '+/- 1.96 SE' w yerrorbars ls 1;
diff --git a/service_provider.c b/service_provider.c
index 1844533..0959155 100644
--- a/service_provider.c
+++ b/service_provider.c
@@ -73,23 +73,6 @@ struct service_provider {
struct server_profile profile;
};
-/* Profiling */
-static void prof_reset(struct server_profile *prof)
-{
- memset(prof, 0, sizeof(*prof));
-}
-
-static void prof_add(struct server_profile *prof, const char *label)
-{
- if(prof->n_times < MAX_TIMES)
- {
- prof->times[prof->n_times] = clock();
- strcpy(prof->labels[prof->n_times], label);
-
- prof->n_times++;
- }
-}
-
/* Generate an EQ certificate for inserting a placeholder with index
* placeholder_idx, given an encloser (which must actually enclose
* a). Note: this function will modify the *mt_nodes array to reflect
@@ -432,6 +415,8 @@ void sp_free(struct service_provider *sp)
}
}
+/* DB lookup. Copies result into a dynamically allocated structure
+ that should be freed with free_record() */
static struct file_record *lookup_record(struct service_provider *sp, uint64_t idx)
{
sqlite3_stmt *st = sp->lookup_record;
@@ -481,10 +466,7 @@ static void insert_record(struct service_provider *sp, const struct file_record
assert(sqlite3_step(st) == SQLITE_DONE);
}
-/* Should we insert sorted (for O(logn) lookup), or just at the end to
- * avoid copying (O(n) lookup, O(1) insertion)? Eventually this will
- * be replaced with a SQL backend. We do not check to ensure that
- * there are no duplicate file indices; that is up to the caller. */
+/* This *might* not be O(log n) time. TODO: check this. */
static void update_record(struct service_provider *sp,
const struct file_record *rec)
{
@@ -581,8 +563,8 @@ static struct file_version *lookup_version(struct service_provider *sp,
return NULL;
}
-/* This does the majority of the work that actually modifies or
- * creates a file. It expects a filled and signed tm_request
+/* This function does the majority of the work that actually modifies
+ * or creates a file. It expects a filled and signed tm_request
* structure, req, and will return the resulting FR certificate and
* its signature in *hmac_out. Additionally, the module's
* authenticated acknowledgement (equal to HMAC(req | 0), where |
diff --git a/service_provider.h b/service_provider.h
index 5867334..25dde68 100644
--- a/service_provider.h
+++ b/service_provider.h
@@ -73,17 +73,6 @@ struct user_request {
* struct after the request response */
} __attribute__((packed));
-#define MAX_TIMES 30
-#define MAX_LABEL 40
-
-/* this struct records a series of clock() times, and labels for them */
-struct server_profile {
- clock_t times[MAX_TIMES];
- char labels[MAX_TIMES][MAX_LABEL];
-
- int n_times;
-};
-
#ifndef CLIENT
struct service_provider *sp_new(const void *key,
size_t keylen,
diff --git a/tabulate.sh b/tabulate.sh
index b01a2eb..edd1336 100755
--- a/tabulate.sh
+++ b/tabulate.sh
@@ -17,8 +17,6 @@ for i in `seq $logleaves_start $logleaves_end`
do
for j in `seq 1 $trials`
do
- echo -n "$i $j " >> dummy_all_"$i".txt
-
# 5 operations in each file
for k in `seq 0 4`
do
@@ -33,7 +31,19 @@ do
cat run_"$i"_"$j".txt | sed -n $start,$end'p' | ../average.sh | awk '{printf($1" ");}' >> rundata_"$i"_"$j"_"$k".txt
done
- cat dummy_"$i"_"$j".txt | awk '/Elapsed/ || /Maximum/ || /User time/ || /System time/' | awk 'BEGIN{line=0}{if(line%4<=1)printf($4" ");if(line %4==2)printf($8" ");if(line%4==3)printf($6" ");}{line+=1}END{printf("\n");}' >> dummy_all_"$i".txt
+ # only 3 operations for dummy
+ for k in `seq 0 2`
+ do
+ start=$(expr $runs_test \* $k + 1)
+ if [[ $k -eq 0 ]]
+ then
+ start=2 # discard first line (with preinserted placeholder)
+ fi
+ end=$(expr $runs_test \* \( $k + 1 \))
+
+ echo -n "$i " > dummy_rundata_"$i"_"$j"_"$k".txt
+ cat dummy_"$i"_"$j".txt | sed -n $start,$end'p' | ../average.sh | awk '{printf($1" ");}' >> dummy_rundata_"$i"_"$j"_"$k".txt
+ done
done
done
@@ -57,3 +67,24 @@ do
cat $f | ../postprocess > final_$f
done
done
+
+# dummy
+for k in `seq 0 2`
+do
+ rm -f "dummy_data_"$k"_"*.txt
+ for i in `seq $logleaves_start $logleaves_end`
+ do
+ for j in `seq 1 $trials`
+ do
+ cat dummy_rundata_"$i"_"$j"_"$k".txt | awk '{for(i=2;i<=NF;i++) { print $1, $i >> "dummy_data_"'$k'"_"i - 1".txt";} }'
+ done
+ done
+done
+
+for k in `seq 0 2`
+do
+ for f in "dummy_data_"$k*
+ do
+ cat $f | ../postprocess > final_$f
+ done
+done
diff --git a/testdummy_preinit.sh b/testdummy_preinit.sh
index 423c875..1fc7375 100755
--- a/testdummy_preinit.sh
+++ b/testdummy_preinit.sh
@@ -20,9 +20,9 @@ start_id=$(echo "2^$1 - $runs_test + 1" | bc)
pid=$!
sleep .2
-/usr/bin/time -v ./testcreate.sh ./dummy_client $runs_test
-/usr/bin/time -v ./testmodify.sh ./dummy_client $runs_test $start_id
-/usr/bin/time -v ./testretrieve.sh ./dummy_client $runs_test $start_id
+./testcreate.sh ./dummy_client $runs_test
+./testmodify.sh ./dummy_client $runs_test $start_id
+./testretrieve.sh ./dummy_client $runs_test $start_id
kill -SIGINT $!