mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
0dc9af5f7e
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
30 lines
577 B
C++
30 lines
577 B
C++
#pragma once
|
|
|
|
#include <AK/AKString.h>
|
|
#include <AK/HashMap.h>
|
|
|
|
struct CProcessStatistics {
|
|
pid_t pid;
|
|
unsigned nsched;
|
|
String name;
|
|
String state;
|
|
String username;
|
|
uid_t uid;
|
|
String priority;
|
|
size_t linear;
|
|
size_t physical;
|
|
unsigned syscalls;
|
|
};
|
|
|
|
class CProcessStatisticsReader {
|
|
public:
|
|
CProcessStatisticsReader();
|
|
HashMap<pid_t, CProcessStatistics> get_map();
|
|
|
|
private:
|
|
void update_map(HashMap<pid_t, CProcessStatistics>& map);
|
|
String get_username_from_uid(const uid_t uid);
|
|
|
|
HashMap<uid_t, String> m_usernames;
|
|
};
|