ContainerTracer
0.1
|
To make structure to JSON format. More...
#include <stdlib.h>
#include <assert.h>
#include <json.h>
#include <jemalloc/jemalloc.h>
#include <driver/docker-driver.h>
#include <runner.h>
Functions | |
static struct json_object * | docker_info_serializer (const struct docker_info *info) |
To make a docker_info structure to json_object . More... | |
static struct json_object * | docker_realtime_log_serializer (const struct realtime_log *log) |
To make a realtime_log structure to json_object . More... | |
static struct json_object * | docker_total_trace_serializer (const struct trace *traces) |
To make a trace structure to json_object . More... | |
static struct json_object * | docker_total_config_serializer (const struct total_results *total, struct docker_total_json_object *jobject) |
To make a total_results structure's config member to json_object . More... | |
static struct json_object * | docker_synthetic_serializer (const struct synthetic *_synthetic) |
To make a synthetic structure to json_object . More... | |
static struct json_object * | docker_stats_serializer (const struct trace_stat *_stats) |
To make a trace_stat structure to json_object . More... | |
static struct json_object * | docker_total_per_trace_serializer (const struct total_results *total, struct docker_total_json_object *jobject) |
To make a total_results structure's per_trace member to json_object . More... | |
static struct json_object * | docker_total_aggr_serializer (const struct total_results *total) |
To make a aggr_result structure's per_trace member to json_object . More... | |
static struct json_object * | docker_total_result_serializer (const struct total_results *total, struct docker_total_json_object *jobject) |
to make a total_results structure's per_trace and aggr_result member to json_object . More... | |
static struct json_object * | docker_total_results_serializer (const struct total_results *total, struct docker_total_json_object *jobject) |
to make a total_results structure's all member to json_object . More... | |
void | docker_realtime_serializer (const struct docker_info *info, const struct realtime_log *log, char *buffer) |
Converts realtime_log to JSON string. More... | |
void | docker_total_serializer (const struct docker_info *info, const struct total_results *total, char *buffer) |
Converts total_results to JSON string. More... | |
To make structure to JSON format.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
static |
To make a docker_info
structure to json_object
.
[in] | info | docker_info data structure which wants to convert json_object . |
json_object
json_object
or attach this to the other json_object
.
|
static |
To make a realtime_log
structure to json_object
.
[in] | log | realtime_log data structure which wants to convert json_object . |
json_object
json_object
or attach this to the other json_object
. void docker_realtime_serializer | ( | const struct docker_info * | info, |
const struct realtime_log * | log, | ||
char * | buffer | ||
) |
Converts realtime_log
to JSON string.
[in] | info | docker_info structure's pointer. |
[in] | log | realtime_log structure's pointer. |
[out] | buffer | Data contains the execution-time results which are converted to JSON. |
buffer
must be allocated memory over and equal INTERVAL_RESULT_STRING_SIZE
|
static |
To make a trace_stat
structure to json_object
.
[in] | _stats | trace_stat data structure which wants to convert json_object . |
json_object
json_object
or attach this to the other json_object
.
|
static |
To make a synthetic
structure to json_object
.
[in] | _synthetic | synthetic data structure which wants to convert json_object . |
json_object
json_object
or attach this to the other json_object
.
|
static |
To make a aggr_result
structure's per_trace
member to json_object
.
[in] | total | total_results data structure which wants to convert aggr_result member to json_object . |
total_results
structure's aggr_result
member's json_object
. This is same form of stats
.json_object
or attach this to the other json_object
.
|
static |
To make a total_results
structure's config
member to json_object
.
[in] | total | total_results data structure which wants to convert config member to json_object . |
[in] | jobject | Address of docker_total_json_object which already occupying the memory. |
total_results
structure's config
member's json_object
json_object
or attach this to the other json_object
.
|
static |
To make a total_results
structure's per_trace
member to json_object
.
[in] | total | total_results data structure which wants to convert per_trace member to json_object . |
[in] | jobject | Address of docker_total_json_object which already occupying the memory. |
total_results
structure's per_trace
member's json_object
json_object
or attach this to the other json_object
.
|
static |
to make a total_results
structure's per_trace
and aggr_result
member to json_object
.
[in] | total | total_results data structure which wants to convert per_trace and aggr_result member to json_object . |
[in] | jobject | address of docker_total_json_object which already occupying the memory. |
total_results
structure's per_trace
and aggr_result
member's json_object
json_object
or attach this to the other json_object
.
|
static |
to make a total_results
structure's all member to json_object
.
[in] | total | total_results data structure which wants to convert all member to json_object . |
[in] | jobject | address of docker_total_json_object which already occupying the memory. |
total_results
structure's all member's json_object
json_object
or attach this to the other json_object
. void docker_total_serializer | ( | const struct docker_info * | info, |
const struct total_results * | total, | ||
char * | buffer | ||
) |
Converts total_results
to JSON string.
[in] | info | docker_info structure's pointer. |
[in] | total | total_results structure's pointer. |
[out] | buffer | Data contains the end-time results which are converted to JSON. |
buffer
must be allocated memory over and equal TOTAL_RESULT_STRING_SIZE
|
static |
To make a trace
structure to json_object
.
[in] | traces | trace data structure which wants to convert json_object . |
json_object
json_object
or attach this to the other json_object
.