Octave

Automated Algorithm Analysis Using GNU Octave - Part 2

In this article I'm going to break down the math for one of our examples, so we can see how the process works.

First of all, we will run our exponential function with the run_timing application for several different values of N.

Looking back at the data from yesterday:

jason@ubuntu:~/Programming$ ./run_timing ./two_to_the_n 20 25 26 27 28 29 30
20: 36437
25: 507890
26: 807668
27: 1584727
28: 3093271
29: 6157129
30: 12325504
Early in analysis: 
Time To Execute: 777300
Velocity: -442890

Automated Algorithm Analysis Using GNU Octave

Jon and I were discussing the minnow scheduler and I suggested to him that it might be possible to use GNU Octave to run an automated analysis of his code and determine how well it will scale as the number of messages sent increases.

The general notion is to use application run times to try and determine if the application has exponential, linear, polynomial, or logarithmic complexity. We can characterize the runtime of a function using regression analysis to generate a polynomial that represents our data and comparing the properties of the generated function to the known algorithm complexities we are concerned about.

Syndicate content