Process constructor

Process({
  1. required int id,
  2. required int osProcessId,
  3. required ProcessType type,
  4. required String profile,
  5. required int naclDebugPort,
  6. required List<TaskInfo> tasks,
  7. double? cpu,
  8. double? network,
  9. double? privateMemory,
  10. double? jsMemoryAllocated,
  11. double? jsMemoryUsed,
  12. double? sqliteMemory,
  13. Cache? imageCache,
  14. Cache? scriptCache,
  15. Cache? cssCache,
})

Implementation

Process({
  /// Unique ID of the process provided by the browser.
  required int id,

  /// The ID of the process, as provided by the OS.
  required int osProcessId,

  /// The type of process.
  required ProcessType type,

  /// The profile which the process is associated with.
  required String profile,

  /// The debugging port for Native Client processes. Zero for other process
  /// types and for NaCl processes that do not have debugging enabled.
  required int naclDebugPort,

  /// Array of TaskInfos representing the tasks running on this process.
  required List<TaskInfo> tasks,

  /// The most recent measurement of the process's CPU usage, expressed as the
  /// percentage of a single CPU core used in total, by all of the process's
  /// threads. This gives a value from zero to CpuInfo.numOfProcessors*100,
  /// which can exceed 100% in multi-threaded processes.
  /// Only available when receiving the object as part of a callback from
  /// onUpdated or onUpdatedWithMemory.
  double? cpu,

  /// The most recent measurement of the process network usage, in bytes per
  /// second. Only available when receiving the object as part of a callback
  /// from onUpdated or onUpdatedWithMemory.
  double? network,

  /// The most recent measurement of the process private memory usage, in
  /// bytes. Only available when receiving the object as part of a callback
  /// from onUpdatedWithMemory or getProcessInfo with the includeMemory flag.
  double? privateMemory,

  /// The most recent measurement of the process JavaScript allocated memory,
  /// in bytes. Only available when receiving the object as part of a callback
  /// from onUpdated or onUpdatedWithMemory.
  double? jsMemoryAllocated,

  /// The most recent measurement of the process JavaScript memory used, in
  /// bytes. Only available when receiving the object as part of a callback
  /// from onUpdated or onUpdatedWithMemory.
  double? jsMemoryUsed,

  /// The most recent measurement of the process's SQLite memory usage, in
  /// bytes. Only available when receiving the object as part of a callback
  /// from onUpdated or onUpdatedWithMemory.
  double? sqliteMemory,

  /// The most recent information about the image cache for the process. Only
  /// available when receiving the object as part of a callback from onUpdated
  /// or onUpdatedWithMemory.
  Cache? imageCache,

  /// The most recent information about the script cache for the process. Only
  /// available when receiving the object as part of a callback from onUpdated
  /// or onUpdatedWithMemory.
  Cache? scriptCache,

  /// The most recent information about the CSS cache for the process. Only
  /// available when receiving the object as part of a callback from onUpdated
  /// or onUpdatedWithMemory.
  Cache? cssCache,
}) : _wrapped = $js.Process(
        id: id,
        osProcessId: osProcessId,
        type: type.toJS,
        profile: profile,
        naclDebugPort: naclDebugPort,
        tasks: tasks.toJSArray((e) => e.toJS),
        cpu: cpu,
        network: network,
        privateMemory: privateMemory,
        jsMemoryAllocated: jsMemoryAllocated,
        jsMemoryUsed: jsMemoryUsed,
        sqliteMemory: sqliteMemory,
        imageCache: imageCache?.toJS,
        scriptCache: scriptCache?.toJS,
        cssCache: cssCache?.toJS,
      );