1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Use the <code>system.cpu</code> API to query CPU metadata.
8 // Counters for assessing CPU utilization. Each field is monotonically
9 // increasing while the processor is powered on. Values are in milliseconds.
11 // The cumulative time used by userspace programs on this processor.
14 // The cumulative time used by kernel programs on this processor.
17 // The cumulative time spent idle by this processor.
20 // The total cumulative time for this processor. This value is equal to
21 // user + kernel + idle.
25 dictionary ProcessorInfo
{
26 // Cumulative usage info for this logical processor.
31 // The number of logical processors.
34 // The architecture name of the processors.
37 // The model name of the processors.
40 // A set of feature codes indicating some of the processor's capabilities.
41 // The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3",
42 // "sse4_1", "sse4_2", and "avx".
45 // Information about each logical processor.
46 ProcessorInfo
[] processors
;
49 callback CpuInfoCallback
= void (CpuInfo info
);
52 // Queries basic CPU information of the system.
53 static
void getInfo
(CpuInfoCallback
callback);