workingset.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. WScript.Echo('hello');
  6. var a = WScript.GetWorkingSet();
  7. WScript.Echo("workingset = " + a.workingSet);
  8. WScript.Echo("maxworkingset = " + a.maxWorkingSet);
  9. WScript.Echo("pagefaultcount = " + a.pageFault);
  10. WScript.Echo("private usage = " + a.privateUsage);
  11. function print(obj, name)
  12. {
  13. WScript.Echo("print object " + name);
  14. for (i in obj)
  15. {
  16. WScript.Echo(i + ' = ' + obj[i]);
  17. }
  18. }
  19. var c = Debug.getHostInfo();
  20. print(c, "hostinfo");
  21. var d = Debug.getMemoryInfo();
  22. for (i in d)
  23. {
  24. print(d[i], i);
  25. }
  26. var b = Debug.getWorkingSet();
  27. WScript.Echo("workingset = " + b.workingSet);
  28. WScript.Echo("maxworkingset = " + b.maxWorkingSet);
  29. WScript.Echo("pagefaultcount = " + b.pageFault);
  30. WScript.Echo("private usage = " + b.privateUsage);