Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys i'm a class 12 student(India). I was asked to create a c++ project for my 12th class( a part of the total board marks). So i thought of many ideas and wanted my project to be a unique and really good one.

One idea that struck my mind was to create a program to benchmark a pc, so i started doing a bit of research and to my vain just couldn't understand most of the coding available in the internet. I don't want to copy paste already available coding in the internet but i also don't think i would have enough time to create an awesome product from the base so thought of taking help from already good ones available and then developing from those coding.

While googling i stumbled upon a site which contained lots of c++ programs to benchmark defferent components in the pc and that site is http://www.roylongbottom.org.uk/#anchorStartDoc[^]. All those codings seem to be Free for any non-profitable purpose which suits my part so i thought instead of creating a program to benchmark the pc myself i thought why not put all those codings in a single program and make it easier. I mean a program which helps users benchmark their pc with those already available codings. I downloaded a few and executed them. I was given with some results which had mflops, no.of int, long computations etc etc which i could just not understand.

So can someone help me understand what those things mean, how they are computed, or is there some documentation available already on this. Is my project good?

I would put all these programs into one single one. Then ask the user to select which component to benchmark and then give those results in a simplified manner( interpret the data and give simplified details) to novice users and to advanced ones give the entire data with some advanced info.

Any suggestions are welcome please help me! I'm not a expert so be detailed with your answers. I'm also not an expert in c++. I chose computer stream for my 11th and 12th and have been learning c++ for the past year.
Posted
Comments
Sergey Alexandrovich Kryukov 27-Jul-14 12:41pm    
Don't you think that if you use someone's product, you need to ask the authors/owners of that product?

Imagine that someone tries to help you. Should this person dig into the product you mention and put oneself in the same situation as you did? Why? Also, you should understand that different benchmarks tests can give different results; many results will depend on operational situations in the system? Benchmarking is a really delicate matter.

—SA
Ashwin Kumar 28-Jul-14 12:21pm    
Yes i did see that it was someones project and i didn't want to steal anything from anyone!
Yes i do understand certain complications in it after a long post of Sa!
Paul Conrad 27-Jul-14 12:48pm    
When you ask to benchmark a PC, what are you planning on benchmarking? Processor speed? Video? Hard disk I/O? Depending on what you are wanting to do, it may be a tall order to fill.
Ashwin Kumar 28-Jul-14 12:22pm    
Nothing in specific just anything and everything that is easy. But i think this is a wrong word and nothing is really easy with the tiny bit of knowledge i currently have( Have to start learning)!
Paul Conrad 28-Jul-14 12:27pm    
Good luck to you and hope you can learn a lot from your endeavor!

1 solution

Okay, "mflops" means "mega (1M) floating-point operations per second". But will it help you much?

Let's see. The application program (including a benchmark) never does the floating-point operation along. It takes floating-point numbers from other instructions, maybe even from memory. The memory is virtual memory, so it can be swapped on disk. Then data can be taken from other CPU instruction, sent over the bus, and so on. Your application can be preempted by some other process. Even it you simply move your mouse, it takes some CPU time; no, there is no a process polling the mouse device, but even the handling of the hardware interrupts caused by the mouse takes some CPU work at the kernel ring, and then the events are generated and propagated to UI, just to show the mouse pointer, forget about handling application-level mouse events.

So, what are you actually measuring with some application program such a benchmark tool? The above is written to show you that the question is not trivial at all.

As with all fields of knowledge, you have a choice: you can create your own benchmark software and principles of measuring, including the metrics themselves, or you can learn the field from the literature; or you can combine both approaches. Speaking of the first way, I would not say it's impossible: you can do the measurements based on your knowledge of the CPU instruction-set architecture, operation, and, importantly, software: OS and application operation. Here, your "not an expert in C++" doesn't sound very promising. If you were such an expert, it would not be enough, by far. Take the programming language along. By a number of reasons, pure C++ would not work (the previous paragraphs should give the idea why). So, you would need to learn another thing: inline Assembly Language (the one embedded in C++; I don't think a stand-along Assembler would be ever absolutely required). But even this would not be enough: CPU operation itself is a very complex thing. If you just need to do some computing and get some result, it would be much easier, but timing requires a lot more knowledge.

But to be practical, in all you create, you have to remember: you can only compare apples with apples, oranges with oranges. Different ways of benchmarking will give different results. So, ultimately, you would need to get an idea what some other benchmarking application do, at least to compare the results and understand the differences. Frankly, this is one of the hard parts, too. Eventually, you will need to learn industrial standards on benchmarking, including but not limited to :
http://en.wikipedia.org/wiki/EEMBC[^],
http://en.wikipedia.org/wiki/SPECint[^],
http://en.wikipedia.org/wiki/SPECfp[^],
http://en.wikipedia.org/wiki/Coremark[^].

By the way, reading documentation provided by those standard organizations can quickly introduce you to the terminology you were asking about.

Now, how about the second way? Start learning literature on bookmarking. Will it require understanding of all of the mentioned above? Surprise: yes!

…Well, perhaps in lesser detail. Otherwise you would not understand what the results mean. I forgot one more aspect: you will certainly understand mathematical statistics and its use, at least the basics. Why. Well, try to time some code; this is easy if you don't want to make it benchmarking, just do timing. First thing you will observer would be the huge statistical dispersion of the result. So, to time reasonably, you would need to collect serious statistics of your data and measure the dispersion and other moments of distribution, interpret these measurements. Please see:
http://en.wikipedia.org/wiki/Statistical_dispersion[^],
http://en.wikipedia.org/wiki/Probability_distribution[^].

So, if you want to get started under really understand benchmarking (if you are still not too much frustrated :-)), go ahead and start learning. Perhaps you could start from here: http://en.wikipedia.org/wiki/Benchmark_%28computing%29[^].

But, to be serious, you still need to start from learning CPU operation in detail and the operation of software: OS and application. I'm afraid to say, here even providing link would not immediately help: you should be able to dig into it by yourself.

For additional encouragement, please read one article I think every beginner in software engineering should read:
Peter Norvig, Teach Yourself Programming in Ten Years,
http://norvig.com/21-days.html[^].

So, if you have been successful in your learning, you already have about 10% of the progress. :-)

—SA
 
Share this answer
 
v6
Comments
Abhinav Gauniyal 27-Jul-14 13:41pm    
Your answers are always inspiring!
Sergey Alexandrovich Kryukov 27-Jul-14 13:56pm    
Thank you very much for your nice words.
—SA
nv3 27-Jul-14 17:47pm    
A 5 for your patience and all the effort you put into this answer. I'd be interested what will become of this 12 year old one day. And my guess is, with a pretty good chance your effort will not be wasted.
Sergey Alexandrovich Kryukov 27-Jul-14 21:35pm    
I would be interested to know that, too, and hope for something good. (By the way, this person is hardly 12-years old, but a student of 12-th grade at school, an adult one.)
Thank you very much for your caring.
—SA
Ashwin Kumar 28-Jul-14 12:28pm    
Thanks very much for your reply was really helpful and...

Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900