[TriLUG] [Novalug] Comparing Clouds; A trivial test. (fwd)
Maxwell Spangler
maxlists at maxwellspangler.com
Mon Oct 28 16:30:32 EDT 2013
On Mon, 2013-10-28 at 10:17 -0400, Warren Myers wrote:
> Hey, Maxwell - I think I spotted a bug on line 43 .. 1%1000000000 will
> never be true :)
That line is
mod_progress = l % 100000000;
It's a lowercase "L", not a "1" :-) Here's a run with the outer loop
disabled so it only does a single pass with the progress line enabled:
➜ [master*]maxwell at elite [cpu-looper] $ ./cpu-looper
Now at 0
Now at 100000000
Now at 200000000
Now at 300000000
Now at 400000000
Now at 500000000
Now at 600000000
Now at 700000000
Now at 800000000
Now at 900000000
Now at 1000000000
Now at 1100000000
Now at 1200000000
Now at 1300000000
Now at 1400000000
Now at 1500000000
Now at 1600000000
Now at 1700000000
Now at 1800000000
Now at 1900000000
➜ [master*]maxwell at elite [cpu-looper] $
> On Mon, Oct 28, 2013 at 3:02 AM, Maxwell Spangler <
> maxlists at maxwellspangler.com> wrote:
>
> > Sorry!
> >
> > While I did actually setup an instance on Google Compute Engine, I
> > didn't remember to run my little test on it. Then, due to the cost of
> > GCE, I shut my instance down pretty fast. Porting was my objective, not
> > benching.
> >
> > The code for my simple little C program is here:
> >
> > https://github.com/maxwax/cpu-looper
> >
> > As you can see, there really isn't much to it and its more comments than
> > actual code which is just *eight* lines. The only point of this program
> > is to generate constant user space CPU activity and it does that
> > perfectly. I dressed up the code with comments so others (including
> > novices) can experiment with it.
> >
--
Maxwell Spangler
========================================================================
Linux System Administration / Virtualization / Development / Computing
Services
Photography / Graphics Design / Writing
Fort Collins, Colorado
http://www.maxwellspangler.com
More information about the TriLUG
mailing list