halcanary | 0d154ee | 2014-08-11 11:33:51 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef ProcStats_DEFINED |
| 9 | #define ProcStats_DEFINED |
| 10 | |
Brian Osman | 68870aa | 2020-07-08 14:12:43 -0400 | [diff] [blame] | 11 | #include <cstdint> |
| 12 | |
halcanary | 0d154ee | 2014-08-11 11:33:51 -0700 | [diff] [blame] | 13 | /** |
| 14 | * ProcStats - Process Statistics Functions |
| 15 | */ |
| 16 | |
| 17 | namespace sk_tools { |
| 18 | |
| 19 | /** |
Brian Osman | 68870aa | 2020-07-08 14:12:43 -0400 | [diff] [blame] | 20 | * If implemented, returns the current resident set size in bytes. |
| 21 | * If not, returns -1. |
| 22 | */ |
| 23 | int64_t getCurrResidentSetSizeBytes(); |
| 24 | |
| 25 | /** |
| 26 | * If implemented, returns the maximum resident set size in MB. |
| 27 | * If not, returns -1. |
| 28 | */ |
| 29 | int64_t getMaxResidentSetSizeBytes(); |
| 30 | |
| 31 | /** |
mtklein | 95553d9 | 2015-03-12 08:24:21 -0700 | [diff] [blame] | 32 | * If implemented, returns the maximum resident set size in MB. |
| 33 | * If not, returns -1. |
halcanary | 0d154ee | 2014-08-11 11:33:51 -0700 | [diff] [blame] | 34 | */ |
mtklein | afb4379 | 2014-08-19 15:55:55 -0700 | [diff] [blame] | 35 | int getMaxResidentSetSizeMB(); |
halcanary | 0d154ee | 2014-08-11 11:33:51 -0700 | [diff] [blame] | 36 | |
mtklein | 95553d9 | 2015-03-12 08:24:21 -0700 | [diff] [blame] | 37 | /** |
| 38 | * If implemented, returns the current resident set size in MB. |
| 39 | * If not, returns -1. |
| 40 | */ |
| 41 | int getCurrResidentSetSizeMB(); |
| 42 | |
halcanary | 0d154ee | 2014-08-11 11:33:51 -0700 | [diff] [blame] | 43 | } // namespace sk_tools |
| 44 | |
| 45 | #endif // ProcStats_DEFINED |