refactor: move struct laye and struct tunnel to packet.h

This commit is contained in:
luwenpeng
2024-08-22 14:31:46 +08:00
parent 41969adee2
commit 3014e0feef
22 changed files with 159 additions and 216 deletions

View File

@@ -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)