refactor: remove active key

master
Sean McBride 4 years ago
parent 9be97568eb
commit ed296466d1

@ -60,7 +60,6 @@ An SLEdge serverless function consists of a shared library (\*.so) and a JSON co
```json
{
"active": true,
"name": "fibonacci",
"path": "fibonacci_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "ekf_first_iter",
"path": "ekf_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "application/octet-stream"
},
{
"active": true,
"name": "ekf_second_iter",
"path": "ekf_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "application/octet-stream"
},
{
"active": true,
"name": "ekf_third_iter",
"path": "ekf_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "ekf",
"path": "ekf_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "cifar10_rand",
"path": "cifar10_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "cifar10_same",
"path": "cifar10_wasm.so",
"port": 10001,

@ -1,5 +1,4 @@
{
"active": true,
"name": "resize_small",
"path": "resize_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "image/png"
},
{
"active": true,
"name": "resize_medium",
"path": "resize_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "image/png"
},
{
"active": true,
"name": "resize_large",
"path": "resize_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "resize",
"path": "resize_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "lpd1",
"path": "lpd_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "lpd2",
"path": "lpd_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "lpd4",
"path": "lpd_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr_72_dpi",
"path": "gocr_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_108_dpi",
"path": "gocr_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_144_dpi",
"path": "gocr_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr_mono",
"path": "gocr_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_urw_gothic",
"path": "gocr_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_lobster_2",
"path": "gocr_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr_1_word",
"path": "gocr_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_10_words",
"path": "gocr_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr_100_words",
"path": "gocr_wasm.so",
"port": 10002,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "hello_ps",
"path": "hello_ps_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "fibonacci_10",
"path": "fibonacci_wasm.so",
"port": 10010,
@ -13,7 +12,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "fibonacci_40",
"path": "fibonacci_wasm.so",
"port": 10040,

@ -1,5 +1,4 @@
{
"active": true,
"name": "empty",
"path": "empty_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "cifar10",
"path": "cifar10_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "ekf",
"path": "ekf_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "lpd",
"path": "lpd_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "resize",
"path": "resize_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "ekf",
"path": "ekf_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "application/octet-stream"
},
{
"active": true,
"name": "resize",
"path": "resize_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "image/png"
},
{
"active": true,
"name": "lpd",
"path": "lpd_wasm.so",
"port": 10002,
@ -38,7 +35,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10003,
@ -51,7 +47,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "cifar10",
"path": "cifar10_wasm.so",
"port": 10004,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work1k",
"path": "work1k_wasm.so",
"port": 10000,
@ -12,7 +11,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "work10k",
"path": "work10k_wasm.so",
"port": 10001,
@ -25,7 +23,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "work100k",
"path": "work100k_wasm.so",
"port": 10002,
@ -38,7 +35,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "work1m",
"path": "work1m_wasm.so",
"port": 10003,

@ -1,5 +1,4 @@
{
"active": true,
"name": "fibonacci_10",
"path": "fibonacci_wasm.so",
"port": 10010,
@ -13,7 +12,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "fibonacci_40",
"path": "fibonacci_wasm.so",
"port": 10040,

@ -1,5 +1,4 @@
{
"active": true,
"name": "cifar10_1.5",
"path": "cifar10_wasm.so",
"port": 10018,
@ -13,7 +12,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "cifar10_1.6",
"path": "cifar10_wasm.so",
"port": 10019,
@ -27,7 +25,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "cifar10_1.7",
"path": "cifar10_wasm.so",
"port": 10020,
@ -41,7 +38,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "cifar10_1.8",
"path": "cifar10_wasm.so",
"port": 10021,
@ -55,7 +51,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "cifar10_1.9",
"path": "cifar10_wasm.so",
"port": 10022,
@ -69,7 +64,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "cifar10_2.0",
"path": "cifar10_wasm.so",
"port": 10023,
@ -83,7 +77,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_1.5",
"path": "ekf_wasm.so",
"port": 10000,
@ -97,7 +90,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_1.6",
"path": "ekf_wasm.so",
"port": 10001,
@ -111,7 +103,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_1.7",
"path": "ekf_wasm.so",
"port": 10002,
@ -125,7 +116,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_1.8",
"path": "ekf_wasm.so",
"port": 10003,
@ -139,7 +129,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_1.9",
"path": "ekf_wasm.so",
"port": 10004,
@ -153,7 +142,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "ekf_2.0",
"path": "ekf_wasm.so",
"port": 10005,
@ -167,7 +155,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_1.5",
"path": "gocr_wasm.so",
"port": 10006,
@ -181,7 +168,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_1.6",
"path": "gocr_wasm.so",
"port": 10007,
@ -195,7 +181,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_1.7",
"path": "gocr_wasm.so",
"port": 10008,
@ -209,7 +194,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_1.8",
"path": "gocr_wasm.so",
"port": 10009,
@ -223,7 +207,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_1.9",
"path": "gocr_wasm.so",
"port": 10010,
@ -237,7 +220,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "gocr_2.0",
"path": "gocr_wasm.so",
"port": 10011,
@ -251,7 +233,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_1.5",
"path": "lpd_wasm.so",
"port": 10012,
@ -265,7 +246,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_1.6",
"path": "lpd_wasm.so",
"port": 10013,
@ -279,7 +259,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_1.7",
"path": "lpd_wasm.so",
"port": 10014,
@ -293,7 +272,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_1.8",
"path": "lpd_wasm.so",
"port": 10015,
@ -307,7 +285,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_1.9",
"path": "lpd_wasm.so",
"port": 10016,
@ -321,7 +298,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "lpd_2.0",
"path": "lpd_wasm.so",
"port": 10017,
@ -335,7 +311,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_1.5",
"path": "resize_wasm.so",
"port": 10018,
@ -349,7 +324,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_1.6",
"path": "resize_wasm.so",
"port": 10019,
@ -363,7 +337,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_1.7",
"path": "resize_wasm.so",
"port": 10020,
@ -377,7 +350,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_1.8",
"path": "resize_wasm.so",
"port": 10021,
@ -391,7 +363,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_1.9",
"path": "resize_wasm.so",
"port": 10022,
@ -405,7 +376,6 @@
"admissions-percentile": 90
},
{
"active": true,
"name": "resize_2.0",
"path": "resize_wasm.so",
"port": 10023,

@ -390,7 +390,6 @@ module_new_from_json(char *file_name)
uint32_t relative_deadline_us = 0;
uint32_t expected_execution_us = 0;
int admissions_percentile = 50;
bool is_active = false;
int32_t request_count = 0;
int32_t response_count = 0;
int j = 1;
@ -429,15 +428,6 @@ module_new_from_json(char *file_name)
argument_count = atoi(val);
if (argument_count < 0 || argument_count > 127)
panic("Expected argument count between 0 and 127, saw %d\n", argument_count);
} else if (strcmp(key, "active") == 0) {
assert(tokens[i + j + 1].type == JSMN_PRIMITIVE);
if (val[0] == 't') {
is_active = true;
} else if (val[0] == 'f') {
is_active = false;
} else {
panic("Expected active key to be a JSON boolean, was %s\n", val);
}
} else if (strcmp(key, "relative-deadline-us") == 0) {
int64_t buffer = strtoll(val, NULL, 10);
if (buffer < 0 || buffer > (int64_t)RUNTIME_RELATIVE_DEADLINE_US_MAX)
@ -518,17 +508,15 @@ module_new_from_json(char *file_name)
/* argsize defaults to 0 if absent */
if (is_active) {
/* Allocate a module based on the values from the JSON */
struct module *module = module_new(module_name, module_path, argument_count, 0, 0,
relative_deadline_us, port, request_size, response_size,
admissions_percentile, expected_execution_us);
if (module == NULL) goto module_new_err;
/* Allocate a module based on the values from the JSON */
struct module *module = module_new(module_name, module_path, argument_count, 0, 0, relative_deadline_us,
port, request_size, response_size, admissions_percentile,
expected_execution_us);
if (module == NULL) goto module_new_err;
assert(module);
module_set_http_info(module, response_count, reponse_headers, response_content_type);
module_count++;
}
assert(module);
module_set_http_info(module, response_count, reponse_headers, response_content_type);
module_count++;
free(reponse_headers);
}

@ -1,5 +1,4 @@
{
"active": true,
"name": "fibonacci",
"path": "fibonacci_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "fibonacci",
"path": "fibonacci_wasm.so",
"port": 10000,
@ -11,7 +10,6 @@
"http-resp-content-type": "text/plain"
},
{
"active": true,
"name": "fibonacci2",
"path": "fibonacci_wasm.so",
"port": 10001,

@ -1,12 +1,11 @@
{
"active": true,
"name": "cifar10",
"path": "cifar10_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"argsize": 1,
"http-req-size": 4096,
"http-resp-headers": [],
"http-resp-size": 128,
"http-resp-content-type": "text/plain"
"name": "cifar10",
"path": "cifar10_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"argsize": 1,
"http-req-size": 4096,
"http-resp-headers": [],
"http-resp-size": 128,
"http-resp-content-type": "text/plain"
}

@ -1,5 +1,4 @@
{
"active": true,
"name": "empty",
"path": "empty_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "fibonacci",
"path": "fibonacci_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "gocr",
"path": "gocr_wasm.so",
"port": 10000,

@ -1,160 +1,140 @@
{
"active": false,
"name": "adpcm",
"path": "adpcm_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"argsize": 2
"name": "adpcm",
"path": "adpcm_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": true,
"name": "bitcount",
"path": "bitcount_wasm.so",
"port": 10002,
"relative-deadline-us": 50000,
"argsize": 2
{
"name": "bitcount",
"path": "bitcount_wasm.so",
"port": 10002,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"name": "basic_math",
"path": "basic_math_wasm.so",
"port": 10004,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"name": "binarytrees",
"path": "binarytrees_wasm.so",
"port": 10006,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"name": "crc",
"path": "crc_wasm.so",
"port": 10008,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"name": "dijkstra",
"path": "dijkstra_wasm.so",
"port": 10010,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"name": "forever",
"path": "forever_wasm.so",
"port": 10012,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"name": "fornever",
"path": "forever_wasm.so",
"port": 10014,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": true,
"name": "basic_math",
"path": "basic_math_wasm.so",
"port": 10004,
"relative-deadline-us": 50000,
"argsize": 1
{
"name": "fft",
"path": "fft_wasm.so",
"port": 10016,
"relative-deadline-us": 50000,
"argsize": 3
},
{
"active": false,
"name": "binarytrees",
"path": "binarytrees_wasm.so",
"port": 10006,
"relative-deadline-us": 50000,
"argsize": 2
{
"name": "function_pointers",
"path": "function_pointers_wasm.so",
"port": 10018,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "crc",
"path": "crc_wasm.so",
"port": 10008,
"relative-deadline-us": 50000,
"argsize": 2
{
"name": "gsm",
"path": "gsm_wasm.so",
"port": 10020,
"relative-deadline-us": 50000,
"argsize": 4
},
{
"active": false,
"name": "dijkstra",
"path": "dijkstra_wasm.so",
"port": 10010,
"relative-deadline-us": 50000,
"argsize": 2
{
"name": "libjpeg",
"path": "libjpeg_wasm.so",
"port": 10022,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "forever",
"path": "forever_wasm.so",
"port": 10012,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "fornever",
"path": "forever_wasm.so",
"port": 10014,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": false,
"name": "fft",
"path": "fft_wasm.so",
"port": 10016,
"relative-deadline-us": 50000,
"argsize": 3
},
{
"active": false,
"name": "function_pointers",
"path": "function_pointers_wasm.so",
"port": 10018,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "gsm",
"path": "gsm_wasm.so",
"port": 10020,
"relative-deadline-us": 50000,
"argsize": 4
},
{
"active": false,
"name": "libjpeg",
"path": "libjpeg_wasm.so",
"port": 10022,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "mandelbrot",
"path": "mandelbrot_wasm.so",
"port": 10024,
"relative-deadline-us": 50000,
"argsize": 2
{
"name": "mandelbrot",
"path": "mandelbrot_wasm.so",
"port": 10024,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": false,
"name": "matrix_multiply",
"path": "matrix_multiply_wasm.so",
"port": 10026,
"relative-deadline-us": 50000,
"argsize": 1
},
"name": "matrix_multiply",
"path": "matrix_multiply_wasm.so",
"port": 10026,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "particia",
"path": "partricia_wasm.so",
"port": 10028,
"relative-deadline-us": 50000,
"argsize": 2
},
"name": "particia",
"path": "partricia_wasm.so",
"port": 10028,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": false,
"name": "sqlite",
"path": "sqlite_wasm.so",
"port": 10030,
"relative-deadline-us": 50000,
"argsize": 1
},
"name": "sqlite",
"path": "sqlite_wasm.so",
"port": 10030,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": true,
"name": "stringsearch",
"path": "stringsearch_wasm.so",
"port": 10032,
"relative-deadline-us": 50000,
"argsize": 1
},
"name": "stringsearch",
"path": "stringsearch_wasm.so",
"port": 10032,
"relative-deadline-us": 50000,
"argsize": 1
},
{
"active": false,
"name": "filesys",
"path": "filesys_wasm.so",
"port": 10034,
"relative-deadline-us": 50000,
"argsize": 3
},
"name": "filesys",
"path": "filesys_wasm.so",
"port": 10034,
"relative-deadline-us": 50000,
"argsize": 3
},
{
"active": false,
"name": "sockserver",
"path": "sockserver_wasm.so",
"port": 10036,
"relative-deadline-us": 50000,
"argsize": 2
},
"name": "sockserver",
"path": "sockserver_wasm.so",
"port": 10036,
"relative-deadline-us": 50000,
"argsize": 2
},
{
"active": false,
"name": "sockclient",
"path": "sockclient_wasm.so",
"port": 10038,
"relative-deadline-us": 50000,
"argsize": 3
"name": "sockclient",
"path": "sockclient_wasm.so",
"port": 10038,
"relative-deadline-us": 50000,
"argsize": 3
}

@ -1,5 +1,4 @@
{
"active": true,
"name": "lpd",
"path": "lpd_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "resize",
"path": "resize_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work",
"path": "work_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work100k",
"path": "work100k_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work10k",
"path": "work10k_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work1k",
"path": "work1k_wasm.so",
"port": 10000,

@ -1,5 +1,4 @@
{
"active": true,
"name": "work1m",
"path": "work1m_wasm.so",
"port": 10000,

Loading…
Cancel
Save