Logo
Explore Help
Register Sign In
mawei/dragonpilot
1
0
Fork 0
You've already forked dragonpilot
mirror of https://github.com/dragonpilot/dragonpilot.git synced 2026-02-25 15:03:53 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
fc7d152dcafe3274aeb35d9c2f7599300ec8489e
dragonpilot/selfdrive/proclogd/main.cc

23 lines
403 B
C++
Raw Normal View History

proclogd: reduce the size of the procLog message by nearly half (#21800) * cp msg to remove the space * no orphans * cleanup * parse using istringstream * add test * split files * cleanup * add parser.cc to files_common * add test for build message * use > 0 * cleanup * test proc/self/stat * more test * dd * fix bug * update test * refactor pidStat * cleanup * test exe * check procs size in message * rename pidStat->ProcStat * don't use util::format_string * robust pids() * catch conversion exception * fix softirq * udpate test * use istringstream * use REQUIRE_THAT&cleanup * reserve vector of procStats * use istream to parse cmdline * cleanup
2021-08-05 17:27:02 +08:00
#include <sys/resource.h>
#include "selfdrive/common/util.h"
#include "selfdrive/proclogd/proclog.h"
ExitHandler do_exit;
int main(int argc, char **argv) {
setpriority(PRIO_PROCESS, 0, -15);
PubMaster publisher({"procLog"});
while (!do_exit) {
MessageBuilder msg;
buildProcLogMessage(msg);
publisher.send("procLog", msg);
util::sleep_for(2000); // 2 secs
}
return 0;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 52ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API