5,597,198 Members 43,321 Now Online
XDA Developers Android and Mobile Development Forum

[APP] RealBench

Tip us?
 
RyanZA
Old
(Last edited by RyanZA; 2nd September 2010 at 10:30 PM.)
#1  
Senior Member - OP
Thanks Meter 726
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Default [APP] RealBench

Okay, I got sick of using Quadrant for benchmarking filesystem improvements, so I spent the last hour or so on this: RealBench!

It's pretty crappy right now, but I plan to add all kinds of different (hopefully) real-world-ish benchmarks.

For now it has just one benchmark -- a benchmark that heavily stresses the filesystem for both reading and writing, as well as heavily stressing ram and the garbage collector. Basically, this is a benchmark designed to do as poorly as possible with the SGS's stock problems. Increases in this benchmark really should correlate with a better, more responsive everyday phone. (Not perfect at this stage though, it still needs work!)

Anyway, it will list the current fps at the top of the screen while it's running. Higher is better! It's also easy to visually see the difference, as it scrolls a bit smoother. If you have any other devices, test this out on them and report back with the scores!

V1.1 Changes
Now writes 1000 files (~30mb of data), and picks randomly from them. This should make it impossible for any caching to occur.
V1.2 Changes
Better cleanup, better initialization.
V1.4 Changes
File writing is now on a separate thread from reading, to give a better estimate of real world usage.
File writing/reading is no longer a 50-50 split, it is now closer to a 80-20 split, for better real world usage.
FC bug fixes.
Black screen on start fixed.
V1.4.1 Changes
Fix for app close.

Notes
Any task which will take focus away from this app will cause it to close. Phone calls, etc.

Please give the version number with any score!
Attached Files
File Type: apk RealBench.1.4.1.apk - [Click for QR Code] (103.5 KB, 2105 views)
 
RyanZA
Old
#2  
Senior Member - OP
Thanks Meter 726
Posts: 2,021
Join Date: Jan 2006
Location: JHB
The difference between stock and oclf looks way too big, I hope I haven't made some mistake somewhere!

This benchmark copies a bitmap out of its apk into ram, and then saves it to disk with a random file name. It then reads that bitmap back out of the new file, decodes it into a drawable, and puts it on screen.

This should stress read, writing, and memory usage.

OCLF should not be getting a boost that huge though, I would have thought. Something may be wrong.

Anyway, test this out on other devices such as the N1 and report back, please!
 
ed10000
Old
#3  
ed10000's Avatar
Senior Member
Thanks Meter 180
Posts: 830
Join Date: Jun 2010
Stock JPC w/o any lagfixes or even root:
Last Minute FPS: 10.92
Longest Period without frames: 1.21sec
 
Zilch25
Old
#4  
Senior Member
Thanks Meter 12
Posts: 1,998
Join Date: Jul 2010
Location: West Palm Beach, FL
Ooooo nifty, giving this a shot
 
cba1986
Old
#5  
cba1986's Avatar
Senior Member
Thanks Meter 414
Posts: 1,864
Join Date: Aug 2010
Location: Somewhere in Buenos Aires
XWJM7 + voodoo beta 1

Last Minute FPS: ~12, Longest period without frames: ~0.93 sec

Almost stock values.

I noticed that in a brief period the current FPS jumps tp 55 and then drops to 11.
 
RyanZA
Old
(Last edited by RyanZA; 2nd September 2010 at 08:45 PM.)
#6  
Senior Member - OP
Thanks Meter 726
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Quote:
Originally Posted by cba1986 View Post
XWJM7 + voodoo beta 1

Last Minute FPS: ~12, Longest period without frames: ~0.93 sec

Almost stock values.

I noticed that in a brief period the current FPS jumps tp 55 and then drops to 11.
OCLF values might be heavily inflated, I'm going to try write a huge whack of files to the disk and pick a random one to read back. That will get rid of any possible caching that might be inflating OCLF scores.

Voodoo being the same as stock is a bit worrying though... hummm...

EDIT: Tried voodoo, and left it running for awhile, and it was getting 13+ which is a pretty good improvement from 10 I guess.


Anyway, new version going up which will get around any caching problems!
 
acer73
Old
#7  
acer73's Avatar
Recognized Contributor
Thanks Meter 3875
Posts: 2,841
Join Date: Nov 2005
Location: Salerno

 
DONATE TO ME
JM5 + any lagfix

Last Minute FPS: ~9, Longest period without frames: 0.96 sec
 
RyanZA
Old
#8  
Senior Member - OP
Thanks Meter 726
Posts: 2,021
Join Date: Jan 2006
Location: JHB
V1.1 is up now! Here is the core of the benchmark for anyone who wants to know what it's doing.

Code:
			int rint = r.nextInt() % 3;
			int bmpres;
			if (rint == 0) {
				bmpres = R.raw.blackbar;
			} else if (rint == 1) {
				bmpres = R.raw.greenbar;
			} else {
				bmpres = R.raw.redbar;
			}

			try {
				InputStream is = getResources().openRawResource(bmpres);
				String Filename = UUID.randomUUID().toString();
				FileOutputStream fos = openFileOutput(Filename, 0);
				byte[] bytebuf = new byte[1024];
				int read;
				while ((read = is.read(bytebuf)) >= 0) {
					fos.write(bytebuf, 0, read);
				}
				is.close();
				fos.getChannel().force(true);
				fos.flush();
				fos.close();
				
				FileNames.add(Filename);

				int pickrandom = r.nextInt(FileNames.size());
				Filename = FileNames.get(pickrandom);
				
				is = openFileInput(Filename);
				ByteArrayOutputStream baos = new ByteArrayOutputStream();
				while ((read = is.read(bytebuf)) >= 0) {
					baos.write(bytebuf, 0, read);
				}
				byte[] rawimage = baos.toByteArray();
				BitmapDrawable bmpdraw = new BitmapDrawable(BitmapFactory.decodeByteArray(rawimage, 0, rawimage.length));
				is.close();
				convertView.setBackgroundDrawable(bmpdraw);

				if (FileNames.size()>1000) {
					pickrandom = r.nextInt(FileNames.size());
					Filename = FileNames.get(pickrandom);
					File file = new File(getFilesDir(), Filename);
					file.delete();
					FileNames.remove(pickrandom);
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
 
ed10000
Old
(Last edited by ed10000; 2nd September 2010 at 09:02 PM.)
#9  
ed10000's Avatar
Senior Member
Thanks Meter 180
Posts: 830
Join Date: Jun 2010
So I tried v1.1 on my stock JPC w/o any lagfix.
Last Minute FPS - 12.64
Longest Period without frames: 1.19s

During the initial 15 seconds, it was constantly 15+ FPS. Max I saw was 22.

EDIT: That's weird though. My previous setup - JM5 + CFLagFix (which I believe is almost the same as OCLF) was a lot smoother in certain places. I'd have expected the difference in scores to be bigger.
 
RyanZA
Old
#10  
Senior Member - OP
Thanks Meter 726
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Okay, OCLF (EXT2) on v1.1 is still giving me 50 fps. I'm stumped.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes