Jump to content

Ccycler a CPU benchmark

sulairris

so i made a little one click CPU benchmark in java.

 

ready to run

post-142539-0-01575000-1429904060.png

 

running

post-142539-0-23371200-1429904089.png

 

done

post-142539-0-08467400-1429904107.png

 

 

you can get it here for free http://nathanlp.tumblr.com/Ccycler
if you use it post your score.

Brony for LIFE!!!

/)^3^(\ RD FTW
Daily carry: HTC one M8, pebbe steel PBD, nexus 7 2013

Link to comment
Share on other sites

Link to post
Share on other sites

self advertising is against the CoC

Are you new to the forums???? read the Code of Conduct HERE WANT SOME AWESOME LTT THEMED WALLPAPERS??? check out XTanksSlayerX's wallpaper thread HERE 

"May our framerates be high, and our temperatures low" - PC MasterRace

Link to comment
Share on other sites

Link to post
Share on other sites

Okay, I'll virus scan it then try it...

Sig under construction.

Link to comment
Share on other sites

Link to post
Share on other sites

uh.. okay?

How does it work?

It does a crap ton of math and times how long it takes to do it.

Brony for LIFE!!!

/)^3^(\ RD FTW
Daily carry: HTC one M8, pebbe steel PBD, nexus 7 2013

Link to comment
Share on other sites

Link to post
Share on other sites

It does a crap ton of math and times how long it takes to do it.

 

What kind of math.

Link to comment
Share on other sites

Link to post
Share on other sites

here is the code if you can read java

 

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package ccycler;import java.awt.Color;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.util.logging.Level;import java.util.logging.Logger;import javax.swing.*;/** * * @author nathan */public class CWin implements ActionListener {    int out=2;    int pro=0;    int st;    int fin;    int score;    boolean star=false;    JFrame window = new JFrame("Ccycler");    JPanel wall = new JPanel();    //JLabel output = new JLabel("output: "+out);    //JLabel progress = new JLabel("progress: "+pro+"/1000000");    JButton start = new JButton ("Run Benchmark");    JLabel scoreD = new JLabel("Score: "+score+" Lower Is Better.");    public CWin(){    window.setDefaultCloseOperation(window.EXIT_ON_CLOSE);    window.setVisible(true);    window.add(wall);    //wall.add(output);    //wall.add(progress);    wall.add(start);    wall.add(scoreD);    wall.setBackground(Color.red);    window.pack();    start.addActionListener((ActionListener) this);   }    public void actionPerformed(ActionEvent e){    if (e.getSource()==start){    System.out.println("test");    pro=0;    score=0;    star=true;    wall.updateUI();    scoreD.setText("Score: "+score+" Lower Is Better.");    wall.setBackground(Color.red);    wall.updateUI();        try {            Thread.sleep(3000);        } catch (InterruptedException ex) {            Logger.getLogger(CWin.class.getName()).log(Level.SEVERE, null, ex);        }    st=(int) System.currentTimeMillis()/1000;    while (pro < 1000000){        out=(int) (out/.2);        //output.setText("output: "+out);        pro=pro+1;        //progress.setText("progress: "+pro+"/1000000");        System.out.println(pro);        System.out.println(out);        wall.updateUI();        }    }    if (pro==1000000){    fin=(int) System.currentTimeMillis()/1000;    wall.setBackground(Color.green);    star=false;    score=fin-st;    System.out.println("score: "+score);    scoreD.setText("Score: "+score+" Lower Is Better.");    window.pack();    }    if (star==true){ start.setText("Benchmarking"); window.pack();}    else {start.setText("Run Benchmark"); window.pack();}    }    }
Edited by colonel_mortis
Added code tags

Brony for LIFE!!!

/)^3^(\ RD FTW
Daily carry: HTC one M8, pebbe steel PBD, nexus 7 2013

Link to comment
Share on other sites

Link to post
Share on other sites

I'm only getting a third CPU utilization with this...

5BBGFC8.png

And because of this low utilization:

y1v8hDL.png

 

4670k @ 3.4GHz

Sig under construction.

Link to comment
Share on other sites

Link to post
Share on other sites

I'm only getting a third CPU utilization with this...

-snip-

windows tends to do that in my testing.

-edit-

my linux box will only let it have one and a half cores.

Brony for LIFE!!!

/)^3^(\ RD FTW
Daily carry: HTC one M8, pebbe steel PBD, nexus 7 2013

Link to comment
Share on other sites

Link to post
Share on other sites

windows tends to do that in my testing.

Yeah. Then how did you get 9 out of it on a Phenom II?

Sig under construction.

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah. Then how did you get 9 out of it on a Phenom II?

This would probably be my question, considering I scored a 57 at 4.4GHz.

Main Rig: CPU: AMD Ryzen 7 5800X | RAM: 32GB (2x16GB) KLEVV CRAS XR RGB DDR4-3600 | Motherboard: Gigabyte B550I AORUS PRO AX | Storage: 512GB SKHynix PC401, 1TB Samsung 970 EVO Plus, 2x Micron 1100 256GB SATA SSDs | GPU: EVGA RTX 3080 FTW3 Ultra 10GB | Cooling: ThermalTake Floe 280mm w/ be quiet! Pure Wings 3 | Case: Sliger SM580 (Black) | PSU: Lian Li SP 850W

 

Server: CPU: AMD Ryzen 3 3100 | RAM: 32GB (2x16GB) Crucial DDR4 Pro | Motherboard: ASUS PRIME B550-PLUS AC-HES | Storage: 128GB Samsung PM961, 4TB Seagate IronWolf | GPU: AMD FirePro WX 3100 | Cooling: EK-AIO Elite 360 D-RGB | Case: Corsair 5000D Airflow (White) | PSU: Seasonic Focus GM-850

 

Miscellaneous: Dell Optiplex 7060 Micro (i5-8500T/16GB/512GB), Lenovo ThinkCentre M715q Tiny (R5 2400GE/16GB/256GB), Dell Optiplex 7040 SFF (i5-6400/8GB/128GB)

Link to comment
Share on other sites

Link to post
Share on other sites

This is not a legitimate test of CPU performance, especially if it isn't achieving 100% utilization.

Link to comment
Share on other sites

Link to post
Share on other sites

This would probably be my question, considering I scored a 57 at 4.4GHz.

Yeah.

Sig under construction.

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah. Then how did you get 9 out of it on a Phenom II?

its still a WIP my laptop with an amd A6 got a 202 it looks like with the testing i have done on my systems that the OS plays a part in it.

Brony for LIFE!!!

/)^3^(\ RD FTW
Daily carry: HTC one M8, pebbe steel PBD, nexus 7 2013

Link to comment
Share on other sites

Link to post
Share on other sites

These kinds of tests need to be multi-threaded, and be optimized to avoid any branch mispredictions, otherwise parts of the CPU will be sitting there doing nothing.
Try spawning the same number of threads, as that there are cores/hardware threads, and do calculations doing that. That should give you a lot more precise indication of the CPU speed.

 

If you share your source code, we might be able to help you out writing something better.

EDIT:
turns out I can't read and you already uploaded your source code. You wanna get rid of all the debug print statements since those have IO delays.You don't want to update your UI on the same thread as you are bench marking, since you don't know what kind of code is behind that, and it might be doing some graphics driver stuff.

Also why do you check if pro == 1000000. It it guaranteed to be that value when you end that loop. 

NOTE: I have never written a CPU benchmark, but this is using some of my knowledge that I gathered over the years.
 

Link to comment
Share on other sites

Link to post
Share on other sites

windows tends to do that in my testing.

-edit-

my linux box will only let it have one and a half cores.

 

Linux can't give it 1.5 cores, since you program is single threaded.

Link to comment
Share on other sites

Link to post
Share on other sites

 

here is the code if you can read java

 

This is the programming section so yeah, many people can read Java ;)

 

Please use code tags when posting code though.

 

its still a WIP

 

Seems like a neat project. See if you can keep improving it :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×