Questions tagged [measurement]

499 questions
7
votes
1 answer

String measurement with Graphics.MeasureString

Please see my code: Graphics grfx = Graphics.FromImage(new Bitmap(1, 1)); System.Drawing.Font f = new System.Drawing.Font("Times New Roman", 10, FontStyle.Regular); const string text1 = "check_space"; SizeF bounds1 = grfx.MeasureString(text1,…
Michael Z
  • 3,883
  • 10
  • 43
  • 57
7
votes
1 answer

iperf3 - Meaning of Retr column in TCP measurement

Sorry for asking this topic, but after reading the tool's documentation and the similar ticket to my question (https://github.com/esnet/iperf/issues/343), I still don't really understand/know the meaning of the Retr column in a TCP measurement, and…
Robert Balogh
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

Custom measurement unit

In iOS 10, Apple introduced several components for quantifying measurements. For example: let velocity = Measurement(value: 3, unit: UnitSpeed.metersPerSecond) Although verbose, the benefits are that you can convert to any other unit without error…
Kelvin Lau
  • 6,373
  • 6
  • 34
  • 57
7
votes
4 answers

How can I measure diagonal distance points?

I can compute horizontal and vertical points, but I cant figure out how to compute distance using diagonal points. Can someone help me with this. here's the code for my horizontal and vertical measuring: private float ComputeDistance(float point1,…
Rye
  • 2,273
  • 9
  • 34
  • 43
7
votes
2 answers

Measure data roaming traffic on Android?

Just back from a very nice vacation in Iceland, and await the data roaming bill from my phone company. I hope for the best having limited my traffic as much as possible, but I want to know in advance. I used the very nice app NetCounter but it…
Benny Skogberg
  • 10,431
  • 11
  • 53
  • 83
7
votes
7 answers

How to measure the TCP/IP overhead without sniffing?

I'm wondering whether there is a programmatic way to obtain a measure of the full bandwidth used when sending data through a TCP stream. Since I cannot seem to know how the network stack would divide the stream into packets, or when it sends a TCP…
Ismael C
  • 111
  • 2
  • 6
7
votes
1 answer

How to measure GPU vs CPU performance? Which time measurement functions?

What libraries or functions need to be used for an objective comparison of CPU and GPU performance? What caveat should be warned for the sake of an accurate evaluation? I using an Ubuntu platform with a device having compute capability 2.1 and…
erogol
  • 13,156
  • 33
  • 101
  • 155
7
votes
1 answer

How many runs of Java program do we need to warm-up the JVM?

Suppose I have a Java program Test.class. I want to measure its execution time. I wrote a wrapper to do this as below: class RunTest { public static void main(String[] args) { long sum = 0; int iterations = 20; int…
JackWM
  • 10,085
  • 22
  • 65
  • 92
6
votes
4 answers

Object height using Kinect

For example, I am standing in-front of my Kinect. The Kinect can identify the joints, and it will expose them as a data structure. Till this point I am clear. So, can we define the height as the difference between Head joint - ((LeftAnkle +…
Dinesh
  • 2,026
  • 7
  • 38
  • 60
6
votes
1 answer

How to consistently number contours in an image time series?

I have automated the task of measuring plant area over time to extrapolate growth rate using an image time-series and the following two methods: (1) Python + ArcGIS, and (2) Python + OpenCV. In the first method, ArcGIS allows me to create a vector…
6
votes
3 answers

Measure user time or system time in Ruby without Benchmark or time

Since I'm doing some time measurements at the moment, I wondered if it is possible to measure the user time or system time without using the Benchmark class or the command line utility time. Using the Time class only reveals the wall clock time, not…
Florian Pilz
  • 8,002
  • 4
  • 22
  • 30
6
votes
2 answers

Swift - Measurement convert(to:) miles to feet gives wrong result

I've been using the Measurement object to convert from mostly lengths. But I have a strange issue. If I convert from miles to feet I get almost the right answer. import Foundation let heightFeet = Measurement(value: 6, unit: UnitLength.feet) //…
Jeff Kempster
  • 63
  • 2
  • 6
6
votes
1 answer

Python async co-routine execution time

I'm trying to measure python async function execution time. But I faced with problem because actual point when the function is starting is unknown. Measurement function code: def timer(func): async def process(func, *args, **params): if…
Oljko
  • 71
  • 1
  • 2
  • 4
6
votes
4 answers

How do you measure code block (thread) execution time with multiple concurrent threads in .NET

Right now we just use something like this stopWatch.Start(); try { method(); } finally { stopWatch.Stop(); } Which works fine for synchronous methods, but…
Davy8
  • 30,868
  • 25
  • 115
  • 173
6
votes
5 answers

Best way to measure Memory Usage of a Java Program?

I'm currently using VisualVM, but the problem I'm having is that I can't save the graphs it generates. I need to report some data about its memory usage and running time, though running time is easy to get with System.nanoTime(). I've also tried the…
iceburn
  • 987
  • 3
  • 13
  • 16