aboutsummaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto.c b/crypto.c
index eae8fb8..402ece9 100644
--- a/crypto.c
+++ b/crypto.c
@@ -541,6 +541,15 @@ void prof_add(struct server_profile *prof, const char *label)
}
}
+/* no bound checks here */
+void prof_concat(struct server_profile *out, const struct server_profile *in)
+{
+ memcpy(out->times + out->n_times, in->times, sizeof(clock_t) * (MAX_TIMES - out->n_times));
+ memcpy(out->labels + out->n_times, in->labels, MAX_LABEL * (MAX_TIMES - out->n_times));
+
+ out->n_times += in->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)