Skip to content

Commit

Permalink
Added some simple perf tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Humphrey committed Mar 13, 2011
1 parent 0b2ab35 commit 5081cfe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions test/perf/random-ellipse.pde
@@ -0,0 +1,3 @@
void draw() {
ellipse(random(width), random(height), 55, 55);
}
8 changes: 8 additions & 0 deletions test/perf/random-fill.pde
@@ -0,0 +1,8 @@
void draw() {
fill(random(255), random(255), random(255));

int topX = random(width - 10);
int topY = random(height - 10);

rect(topX, topY, topX + 10, topY + 10);
}
6 changes: 0 additions & 6 deletions test/perf/random-line.pde
Expand Up @@ -4,15 +4,9 @@ void setup() { // this is run once.
// set the background color
background(255);

// canvas size (Integers only, please.)
size(300, 300);

// smooth edges
smooth();

// limit the number of frames per second
frameRate(30);

// set the width of the line.
strokeWeight(12);
}
Expand Down
3 changes: 3 additions & 0 deletions test/perf/random-point.pde
@@ -0,0 +1,3 @@
void draw() {
point(random(width), random(height));
}
3 changes: 3 additions & 0 deletions test/perf/tests.js
Expand Up @@ -2,5 +2,8 @@
var tests = [
{ path: "empty-baseline.pde", tags: ["Calibration"] },
{ path: "background.pde", tags: ["2D"] },
{ path: "random-ellipse.pde", tags: ["2D"] },
{ path: "random-point.pde", tags: ["2D"] },
{ path: "random-fill.pde", tags: ["2D"] },
{ path: "random-line.pde", tags: ["2D"] }
];

0 comments on commit 5081cfe

Please sign in to comment.