diff --git a/common/SConscript b/common/SConscript index b8c23b7019..9b81e1dd29 100644 --- a/common/SConscript +++ b/common/SConscript @@ -2,7 +2,6 @@ Import('env', 'envCython', 'arch') common_libs = [ 'params.cc', - 'statlog.cc', 'swaglog.cc', 'util.cc', 'i2c.cc', diff --git a/common/statlog.cc b/common/statlog.cc deleted file mode 100644 index 587f3e8620..0000000000 --- a/common/statlog.cc +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include "common/statlog.h" -#include "common/util.h" - -#include -#include -#include -#include - -class StatlogState : public LogState { - public: - StatlogState() : LogState("ipc:///tmp/stats") {} -}; - -static StatlogState s = {}; - -static void log(const char* metric_type, const char* metric, const char* fmt, ...) { - std::lock_guard lk(s.lock); - if (!s.initialized) s.initialize(); - - char* value_buf = nullptr; - va_list args; - va_start(args, fmt); - int ret = vasprintf(&value_buf, fmt, args); - va_end(args); - - if (ret > 0 && value_buf) { - char* line_buf = nullptr; - ret = asprintf(&line_buf, "%s:%s|%s", metric, value_buf, metric_type); - if (ret > 0 && line_buf) { - zmq_send(s.sock, line_buf, ret, ZMQ_NOBLOCK); - free(line_buf); - } - free(value_buf); - } -} - -void statlog_log(const char* metric_type, const char* metric, int value) { - log(metric_type, metric, "%d", value); -} - -void statlog_log(const char* metric_type, const char* metric, float value) { - log(metric_type, metric, "%f", value); -} diff --git a/common/statlog.h b/common/statlog.h deleted file mode 100644 index 5d223bb666..0000000000 --- a/common/statlog.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#define STATLOG_GAUGE "g" -#define STATLOG_SAMPLE "sa" - -void statlog_log(const char* metric_type, const char* metric, int value); -void statlog_log(const char* metric_type, const char* metric, float value); - -#define statlog_gauge(metric, value) statlog_log(STATLOG_GAUGE, metric, value) -#define statlog_sample(metric, value) statlog_log(STATLOG_SAMPLE, metric, value) diff --git a/release/files_common b/release/files_common index 2ef68651c8..3dd116613c 100644 --- a/release/files_common +++ b/release/files_common @@ -127,30 +127,8 @@ selfdrive/debug/vw_mqb_config.py common/SConscript common/version.h -common/prefix.h -common/swaglog.h -common/swaglog.cc -common/statlog.h -common/statlog.cc -common/util.cc -common/util.h -common/queue.h -common/clutil.cc -common/clutil.h -common/params.h -common/params.cc -common/ratekeeper.cc -common/ratekeeper.h -common/watchdog.cc -common/watchdog.h - -common/mat.h -common/timing.h - -common/gpio.cc -common/gpio.h -common/i2c.cc -common/i2c.h +common/*.h +common/*.cc selfdrive/controls/__init__.py selfdrive/controls/controlsd.py