1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 
15 package org.eclipse.test.internal.performance;
16 
17 import org.eclipse.test.internal.performance.data.Dim;
18 import org.eclipse.test.internal.performance.data.Unit;
19 
20 /**
21  * Some hard coded measurement id's.
22  */
23 public interface InternalDimensions {
24 
25     // Common:
26     // OS Counters:
27     Dim SYSTEM_TIME = new Dim(2, Unit.SECOND, 1000), // System.currentTimeMillis. "System Time"
28             USED_JAVA_HEAP = new Dim(3, Unit.BYTE), // Runtime.totalMemory() - Runtime.freeMemory()
29             WORKING_SET = new Dim(4, Unit.BYTE), // the working set (or on Linux the resident set). "Working Set"
30             // USER_TIME= new Dim(10, Unit.SECOND, 1000), // the amount of elapsed user time. "User time"
31             KERNEL_TIME = new Dim(11, Unit.SECOND, 1000), // the amount of elapsed kernel time. "Kernel time"
32             CPU_TIME = new Dim(20, Unit.SECOND, 1000), // the amount of CPU time we have used so far. "CPU Time"
33             INVOCATION_COUNT = new Dim(52, Unit.INVOCATION, 1); // the number of method invocations. "Invocation Count"
34 
35     // OS Info:
36     Dim PHYSICAL_TOTAL = new Dim(24, Unit.BYTE), // the amount of physical memory in bytes. "Physical Memory"
37             SYSTEM_CACHE = new Dim(26, Unit.BYTE); // the amount of system cache memory in bytes. "System Cache"
38 
39     // Windows:
40     // OS Counters:
41     Dim COMITTED       = new Dim(7, Unit.BYTE), // "Committed"
42             WORKING_SET_PEAK = new Dim(8, Unit.BYTE), // "Working Set Peak"
43             ELAPSED_PROCESS = new Dim(9, Unit.SECOND, 1000), // "Elapsed Process"
44             PAGE_FAULTS = new Dim(19), // "Page Faults"
45             GDI_OBJECTS = new Dim(34), // "GDI Objects"
46             USER_OBJECTS = new Dim(35), // "USER Objects"
47             OPEN_HANDLES = new Dim(36), // "Open Handles"
48             READ_COUNT = new Dim(38, Unit.BYTE), // "Read Count"
49             WRITE_COUNT = new Dim(39, Unit.BYTE), // "Write Count"
50             BYTES_READ = new Dim(40, Unit.BYTE), // "Bytes Read"
51             BYTES_WRITTEN = new Dim(41, Unit.BYTE); // "Bytes Written"
52 
53     // OS Info:
54     Dim COMMIT_LIMIT   = new Dim(22), // "Commit Limit"
55             COMMIT_PEAK = new Dim(23), // "Commit Peak"
56             PHYSICAL_AVAIL = new Dim(25, Unit.BYTE), // "Physical Available"
57             KERNEL_TOTAL = new Dim(27), // "Kernel Total"
58             KERNEL_PAGED = new Dim(28), // "Kernel Paged"
59             KERNEL_NONPAGED = new Dim(29), // "Kernel Nonpaged"
60             PAGE_SIZE = new Dim(30, Unit.BYTE), // "Page Size"
61             HANDLE_COUNT = new Dim(31), // "Handle Count"
62             PROCESS_COUNT = new Dim(32), // "Process Count"
63             THREAD_COUNT = new Dim(33), // "Thread Count"
64             COMMIT_TOTAL = new Dim(37);            // "Commit Total"
65 
66     // Linux:
67     // OS Counters:
68     Dim HARD_PAGE_FAULTS = new Dim(42), // the number of hard page faults. A page had to be fetched from disk. "Hard Page Faults"
69             SOFT_PAGE_FAULTS = new Dim(43), // the number of soft page faults. A page was not fetched from disk. "Soft Page Faults"
70             TRS = new Dim(44, Unit.BYTE), // the amount of memory in bytes occupied by text (i.e. code). "Text Size"
71             DRS = new Dim(45, Unit.BYTE), // the amount of memory in bytes occupied by data or stack. "Data Size"
72             LRS = new Dim(46, Unit.BYTE); // the amount of memory in bytes occupied by shared code. "Library Size"
73 
74     // OS Info:
75     Dim USED_LINUX_MEM   = new Dim(48, Unit.BYTE), // the amount of memory that Linux reports is used. From /proc/meminfo.
76                                                    // "Used Memory"
77             FREE_LINUX_MEM = new Dim(49, Unit.BYTE), // the amount of memory that Linux reports is free. From /proc/meminfo.
78                                                      // "Free Memory"
79             BUFFERS_LINUX = new Dim(50, Unit.BYTE); // the amount of memory that Linux reports is used by buffers. From
80                                                     // /proc/meminfo. "Buffers Memory"
81 
82     // Mac:
83     // OS Counters:
84     // OS Info:
85 }
86