ContainerTracer
0.1
|
Implementation of run the trace-replay
benchmark with Docker.
More...
#include <stdlib.h>
#include <errno.h>
#include <search.h>
#include <assert.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/syscall.h>
#include <json.h>
#include <jemalloc/jemalloc.h>
#include <generic.h>
#include <runner.h>
#include <driver/docker-driver.h>
#include <log.h>
#include <trace_replay.h>
Enumerations | |
enum | { DOCKER_NONE_SCHEDULER = 0, DOCKER_KYBER_SCHEDULER, DOCKER_BFQ_SCHEDULER } |
Functions | |
static void | __docker_rm_container (struct docker_info *info) |
Remove the docker container. More... | |
static void | __docker_free (void) |
Deallocate this driver's resources. More... | |
int | docker_valid_scheduler_test (const char *scheduler) |
Check the current inputted scheduler text can be supported by the driver. More... | |
int | docker_has_weight_scheduler (const int scheduler_index) |
Check the parameter's scheduler_index supports weight. More... | |
int | docker_create_local_images (void) |
Create the docker local image. More... | |
int | docker_init (void *object) |
Initialize the global configuration and per processes configuration. More... | |
static int | docker_set_cgroup_state (struct docker_info *current) |
Set the child process to specific control group(cgroup) More... | |
static int | docker_create_container (struct docker_info *current) |
Each process trace-replay execute part. More... | |
int | docker_runner (void) |
Run all processes' trace-replay part. More... | |
int | docker_get_interval (const char *key, char *buffer) |
Get execution-time results from trace-replay . More... | |
int | docker_get_total (const char *key, char *buffer) |
Get end-time results from trace-replay . More... | |
void | docker_free (void) |
Deallocate resources of this driver. More... | |
Variables | |
static const char * | docker_valid_scheduler [] |
Associated table of I/O scheduler. More... | |
static const int | docker_weight_support_scheduler [] = { DOCKER_BFQ_SCHEDULER } |
static struct docker_info * | global_info_head |
Implementation of run the trace-replay
benchmark with Docker.
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 |
Deallocate this driver's resources.
|
static |
Remove the docker container.
[in] | info | Docker information that wants to remove. |
|
static |
Each process trace-replay
execute part.
[in] | current | The structure which has the current process information. |
int docker_create_local_images | ( | void | ) |
Create the docker local image.
void docker_free | ( | void | ) |
Deallocate resources of this driver.
int docker_get_interval | ( | const char * | key, |
char * | buffer | ||
) |
Get execution-time results from trace-replay
.
[in] | key | cgroup_id value which specifies the location of data I want to get. |
[out] | buffer | Data contains the execution-time results based on key . |
log.type
for success to get information, negative value for fail to get information. buffer
must be allocated memory over and equal INTERVAL_RESULT_STRING_SIZE
int docker_get_total | ( | const char * | key, |
char * | buffer | ||
) |
Get end-time results from trace-replay
.
[in] | key | cgroup_id value which specifies the location of data I want to get. |
[out] | buffer | Data contains the end-time results based on key . |
buffer
must be allocated memory over and equal TOTAL_RESULT_STRING_SIZE
int docker_has_weight_scheduler | ( | const int | scheduler_index | ) |
Check the parameter's scheduler_index
supports weight.
[in] | scheduler_index | The scheduler's index which is based on docker_valid_scheduler and wants to check. |
int docker_init | ( | void * | object | ) |
Initialize the global configuration and per processes configuration.
[in] | object | global runner_config pointer. |
int docker_runner | ( | void | ) |
Run all processes' trace-replay
part.
|
static |
Set the child process to specific control group(cgroup)
[in] | current | The structure which has the current process information. |
int docker_valid_scheduler_test | ( | const char * | scheduler | ) |
Check the current inputted scheduler text can be supported by the driver.
[in] | scheduler | Inputted scheduler string. |
|
static |
Associated table of I/O scheduler.
|
static |
|
static |
global docker_info
list