![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | measure-object {get-process} Using the command measure-object {get-process} I keep getting negative amounts of time returned. Anyone else seeing this? Thanks Andrew Watt MVP |
My System Specs![]() |
| | #2 (permalink) |
| | RE: measure-object {get-process} I don't get negative numbers. In fact, I am not getting any output at all Moreover, passing "{get-process}" doesn't run "get-process" You have to make the statement to run using "&" Anyways, I think you were trying to do something like "gps | Measure-Object -InputObject { $_ }" or "Measure-Object (gps)" where the latter would not work since "-InputObject" parameter accepts just one "PSObject". "Andrew Watt [MVP]" wrote: > Using the command > > measure-object {get-process} > > I keep getting negative amounts of time returned. > > Anyone else seeing this? > > Thanks > > Andrew Watt MVP > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: measure-object {get-process} Apologies. I meant to write measure-command {get-process} Andrew Watt MVP On Sun, 21 May 2006 11:45:01 -0700, DBMwS <DBMwS@discussions.microsoft.com> wrote: >I don't get negative numbers. In fact, I am not getting any output at all >Moreover, passing "{get-process}" doesn't run "get-process" >You have to make the statement to run using "&" > >Anyways, I think you were trying to do something like "gps | Measure-Object >-InputObject { $_ }" or "Measure-Object (gps)" where the latter would not >work since "-InputObject" parameter accepts just one "PSObject". > > > >"Andrew Watt [MVP]" wrote: > >> Using the command >> >> measure-object {get-process} >> >> I keep getting negative amounts of time returned. >> >> Anyone else seeing this? >> >> Thanks >> >> Andrew Watt MVP |
My System Specs![]() |
| | #4 (permalink) |
| | Re: measure-object {get-process} Andrew Watt [MVP] wrote: > Apologies. > > I meant to write > > measure-command {get-process} > > Andrew Watt MVP > > > On Sun, 21 May 2006 11:45:01 -0700, DBMwS > <DBMwS@discussions.microsoft.com> wrote: > >> I don't get negative numbers. In fact, I am not getting any output at all >> Moreover, passing "{get-process}" doesn't run "get-process" >> You have to make the statement to run using "&" >> >> Anyways, I think you were trying to do something like "gps | Measure-Object >> -InputObject { $_ }" or "Measure-Object (gps)" where the latter would not >> work since "-InputObject" parameter accepts just one "PSObject". >> >> >> >> "Andrew Watt [MVP]" wrote: >> >>> Using the command >>> >>> measure-object {get-process} >>> >>> I keep getting negative amounts of time returned. >>> >>> Anyone else seeing this? >>> >>> Thanks >>> >>> Andrew Watt MVP OK here Measure-Command {get-process}Measure-Command {get-process} .... TotalMilliseconds : 2.2503 gr /\/\o\/\/ |
My System Specs![]() |
| | #5 (permalink) |
| | Re: measure-object {get-process} On Sun, 21 May 2006 21:22:30 +0200, "/\\/\\o\\/\\/" <no@spam.mow> wrote: >Andrew Watt [MVP] wrote: >> Apologies. >> >> I meant to write >> >> measure-command {get-process} >> >> Andrew Watt MVP >> >> >> On Sun, 21 May 2006 11:45:01 -0700, DBMwS >> <DBMwS@discussions.microsoft.com> wrote: >> >>> I don't get negative numbers. In fact, I am not getting any output at all >>> Moreover, passing "{get-process}" doesn't run "get-process" >>> You have to make the statement to run using "&" >>> >>> Anyways, I think you were trying to do something like "gps | Measure-Object >>> -InputObject { $_ }" or "Measure-Object (gps)" where the latter would not >>> work since "-InputObject" parameter accepts just one "PSObject". >>> >>> >>> >>> "Andrew Watt [MVP]" wrote: >>> >>>> Using the command >>>> >>>> measure-object {get-process} >>>> >>>> I keep getting negative amounts of time returned. >>>> >>>> Anyone else seeing this? >>>> >>>> Thanks >>>> >>>> Andrew Watt MVP >OK here > >Measure-Command {get-process}Measure-Command {get-process} >... >TotalMilliseconds : 2.2503 > >gr /\/\o\/\/ Interesting. For me: measure-command {get-process} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : -312 Ticks : -3122598 TotalDays : -3.61411805555556E-06 TotalHours : -8.67388333333333E-05 TotalMinutes : -0.00520433 TotalSeconds : -0.3122598 TotalMilliseconds : -312.2598 It does sometimes (not sure why) give a positive value around 4ms. Can give divergent results (i.e. believable positive time and less credible negative time) when run twice within seconds of each other. Andrew Watt MVP |
My System Specs![]() |
| | #6 (permalink) |
| | Re: measure-object {get-process} I don't get negative results, did you file a bug already? PoSh 1 C:\>1..10 | % { Measure-Command { get-process } } | % { $_.TotalMilliseconds } 4,2815 4,3323 3,7884 3,9505 6,2644 15,8919 4,196 6,4463 16,9566 13,4299 -- greetings dreeschkind "Andrew Watt [MVP]" wrote: > On Sun, 21 May 2006 21:22:30 +0200, "/\\/\\o\\/\\/" <no@spam.mow> > wrote: > > >Andrew Watt [MVP] wrote: > >> Apologies. > >> > >> I meant to write > >> > >> measure-command {get-process} > >> > >> Andrew Watt MVP > >> > >> > >> On Sun, 21 May 2006 11:45:01 -0700, DBMwS > >> <DBMwS@discussions.microsoft.com> wrote: > >> > >>> I don't get negative numbers. In fact, I am not getting any output at all > >>> Moreover, passing "{get-process}" doesn't run "get-process" > >>> You have to make the statement to run using "&" > >>> > >>> Anyways, I think you were trying to do something like "gps | Measure-Object > >>> -InputObject { $_ }" or "Measure-Object (gps)" where the latter would not > >>> work since "-InputObject" parameter accepts just one "PSObject". > >>> > >>> > >>> > >>> "Andrew Watt [MVP]" wrote: > >>> > >>>> Using the command > >>>> > >>>> measure-object {get-process} > >>>> > >>>> I keep getting negative amounts of time returned. > >>>> > >>>> Anyone else seeing this? > >>>> > >>>> Thanks > >>>> > >>>> Andrew Watt MVP > >OK here > > > >Measure-Command {get-process}Measure-Command {get-process} > >... > >TotalMilliseconds : 2.2503 > > > >gr /\/\o\/\/ > > Interesting. > > For me: > > measure-command {get-process} > > > Days : 0 > Hours : 0 > Minutes : 0 > Seconds : 0 > Milliseconds : -312 > Ticks : -3122598 > TotalDays : -3.61411805555556E-06 > TotalHours : -8.67388333333333E-05 > TotalMinutes : -0.00520433 > TotalSeconds : -0.3122598 > TotalMilliseconds : -312.2598 > > It does sometimes (not sure why) give a positive value around 4ms. > > Can give divergent results (i.e. believable positive time and less > credible negative time) when run twice within seconds of each other. > > Andrew Watt MVP > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: measure-object {get-process} I've bugged it now: https://connect.microsoft.com/feedba...edbackID=78415 Andrew Watt MVP On Sun, 21 May 2006 17:09:03 -0700, dreeschkind <dreeschkind@discussions.microsoft.com> wrote: >I don't get negative results, did you file a bug already? > >PoSh 1 C:\>1..10 | % { Measure-Command { get-process } } | % { >$_.TotalMilliseconds } >4,2815 >4,3323 >3,7884 >3,9505 >6,2644 >15,8919 >4,196 >6,4463 >16,9566 >13,4299 |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to use measure-object against multiple file types | PowerShell | |||
| Problem with Measure-Object on get-process | PowerShell | |||
| Adding canonical aliases for Compare-Object, Measure-Object, New-Object | PowerShell | |||
| Default display for measure-object | PowerShell | |||
| Multiple errors in help for measure-object | PowerShell | |||