|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-30 11:33 UTC] preston dot bannister at cox dot net
[2003-01-18 16:07 UTC] phanto@php.net
[2003-01-29 20:07 UTC] phanto@php.net
[2003-02-08 01:01 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
vbscript code: wscript.echo now For I = 1 To 3000 set ru=GetObject("WinMgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_NetworkAdapterConfiguration") set ru = nothing Next wscript.echo now vbscript output: C:\php\wmi>cscript wmi.vbs Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. 26/10/2002 00:07:26 26/10/2002 00:08:16 php code: $prof = new Profiler; for ($i=0;$i<3000;$i++){ $prof->startTimer($i); $Services = new COM("winmgmts:{impersonationLevel=impersonate}") or die("glump"); $NetworkAdapterSet = $Services->InstancesOf('Win32_NetworkAdapterConfiguration'); $NetworkAdapterSet->release(); $Services->release(); unset($Services); unset($NetworkAdapterSet); $prof->stopTimer($i); } php results: C:\php\snaps\php4-win32-latest>php c:\php\wmi\wmiperf.php Warning: (null)(): Invoke() failed: Exception occurred. <b>Source</b>: SWbemServices <b>Description</b>: Generic failure in c:\php\wmi\wmiperf.php on line 7 Fatal error: Call to a member function on a non-object in c:\php\wmi\wmiperf.php on line 8 doing it as 3 seperate runs yielded: 0-1000 runs: 11313.1239 ms (100.00 %) OVERALL TIME 1000-2000 runs: 23879.2120 ms (100.00 %) OVERALL TIME 2000-3000: 544210.0750 ms (100.00 %) OVERALL TIME At the same time, memory utilization of winmgmt.exe rises to ~30mb from the normal 4mb... Looks like something isn't getting freed right...