OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 enum Architecture { | 22 enum Architecture { |
23 SI_ARCH_UNKNOWN = -1, | 23 SI_ARCH_UNKNOWN = -1, |
24 SI_ARCH_X86 = 0, | 24 SI_ARCH_X86 = 0, |
25 SI_ARCH_X64 = 1, | 25 SI_ARCH_X64 = 1, |
26 SI_ARCH_ARM = 2 | 26 SI_ARCH_ARM = 2 |
27 }; | 27 }; |
28 | 28 |
29 SystemInfo(); | 29 SystemInfo(); |
30 | 30 |
31 // The number of CPU Cores in the system. | |
32 int GetMaxPhysicalCpus(); | |
33 // The number of CPU Threads in the system. | 31 // The number of CPU Threads in the system. |
34 int GetMaxCpus(); | 32 static int GetMaxCpus(); |
35 // The number of CPU Threads currently available to this process. | 33 // The number of CPU Threads currently available to this process. |
36 int GetCurCpus(); | 34 static int GetCurCpus(); |
37 // Identity of the CPUs. | 35 // Identity of the CPUs. |
38 Architecture GetCpuArchitecture(); | 36 Architecture GetCpuArchitecture(); |
39 std::string GetCpuVendor(); | 37 std::string GetCpuVendor(); |
40 int GetCpuFamily(); | |
41 int GetCpuModel(); | |
42 int GetCpuStepping(); | |
43 // Return size of CPU cache in bytes. Uses largest available cache (L3). | |
44 int GetCpuCacheSize(); | |
45 // Estimated speed of the CPUs, in MHz. e.g. 2400 for 2.4 GHz | |
46 int GetMaxCpuSpeed(); | |
47 int GetCurCpuSpeed(); | |
48 // Total amount of physical memory, in bytes. | 38 // Total amount of physical memory, in bytes. |
49 int64 GetMemorySize(); | 39 int64 GetMemorySize(); |
50 // The model name of the machine, e.g. "MacBookAir1,1" | 40 // The model name of the machine, e.g. "MacBookAir1,1" |
51 std::string GetMachineModel(); | 41 std::string GetMachineModel(); |
52 | 42 |
53 // The gpu identifier | |
54 struct GpuInfo { | |
55 GpuInfo(); | |
56 ~GpuInfo(); | |
57 std::string device_name; | |
58 std::string description; | |
59 int vendor_id; | |
60 int device_id; | |
61 std::string driver; | |
62 std::string driver_version; | |
63 }; | |
64 bool GetGpuInfo(GpuInfo *info); | |
65 | |
66 private: | 43 private: |
67 int physical_cpus_; | 44 static int logical_cpus_; |
68 int logical_cpus_; | |
69 int cache_size_; | |
70 Architecture cpu_arch_; | |
71 std::string cpu_vendor_; | |
72 int cpu_family_; | |
73 int cpu_model_; | |
74 int cpu_stepping_; | |
75 int cpu_speed_; | |
76 int64 memory_; | |
77 std::string machine_model_; | |
78 }; | 45 }; |
79 | 46 |
80 } // namespace rtc | 47 } // namespace rtc |
81 | 48 |
82 #endif // WEBRTC_BASE_SYSTEMINFO_H__ | 49 #endif // WEBRTC_BASE_SYSTEMINFO_H__ |
OLD | NEW |