refactor: move struct laye and struct tunnel to packet.h
This commit is contained in:
@@ -252,19 +252,13 @@ struct stellar_stat
|
||||
// /opt/MESA/bin/fieldstat_exporter.py local -j log/stellar_fs4.json -e -l --clear-screen
|
||||
struct stellar_stat *stellar_stat_new(uint16_t nr_thread)
|
||||
{
|
||||
char cwd[1024] = {0};
|
||||
struct stellar_stat *stat = (struct stellar_stat *)calloc(1, sizeof(struct stellar_stat));
|
||||
if (stat == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (getcwd(cwd, sizeof(cwd)) == NULL)
|
||||
{
|
||||
STAT_LOG_ERROR("failed to get current working directory: %s", strerror(errno));
|
||||
goto error_out;
|
||||
}
|
||||
snprintf(stat->output_file, sizeof(stat->output_file), "%s/log/stellar_fs4.json", cwd);
|
||||
snprintf(stat->output_file, sizeof(stat->output_file), "./log/stellar_fs4.json");
|
||||
|
||||
stat->fs = fieldstat_easy_new(1, "stellar", NULL, 0);
|
||||
if (stat->fs == NULL)
|
||||
|
||||
Reference in New Issue
Block a user