1

I'm reading about Measure-PnPResponseTime PnP PowerShell command and don't know what the Histogram property talks about. I would like someone could explain to me what is the meaning of the keys and how are they get from. In addition, why so many values are equal to 0. I can not understand the reason for these key/value pairs.

Let me show you an example of what I got from after running this command.

PS C:\Users\jaime.lopez.lopez\Desktop\_dev\learning\PowerShell PnP> $measure

Mode              : RoundTrip
Average           : 131,29
Max               : 3720
Min               : 97
StandardDeviation : 173,85
TruncatedAverage  : 108,95375
Histogram         : {[744, 994], [1488, 4], [2232, 0], [2976, 0]...}
Count             : 1000

PS C:\Users\jaime.lopez.lopez\Desktop\_dev\learning\PowerShell PnP> $measure.Histogram

 Key Value
 --- -----
 744   994
1488     4
2232     0
2976     0
3720     2
1

I think I found the solution to my question. Really simple and really easy but difficult to see. The number of keys is set in the command using the Histogram parameter. That means the number of buckets or keys you want to have. So, in the example above, I decided to have only 5 buckets and that are the keys that histogram shows.

So, the next question is why the key has this value. That's easy too. If you take a look at the last key item in the Histogram property you will notice that it is equal to the Max property of $measurevariable. If we divide this value by the number of buckets we want to have we obtained the value for each of the keys depending on its position. Let me explain by example. Max value is 3720 and if we divide it by 5 buckets we obtain a value of 744 that it is the first key in Histogram property. If we multiply 744 two times we obtain 1488 that is the second key. And the third key must be 744 three times and so on.

Each key represents a request that takes less or that value to be resolved. So, in the first case, there are 944 requests that took 744 ms or less. In the second case, there are 4 requests that took less than 1488ms and more than 744 ms, and so on.

Hope this helps you with the results of this command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.