Skip to content

Commit

Permalink
Some sprucing up of output/code
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lew committed Nov 19, 2013
1 parent 253e8e4 commit 9152ed4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onClick(View v) {
}

private void updateStatus() {
mStatusTextView.setText("Depth=" + mDepth + " Views (per node)=" + mNumChildrenPerNode + " total=" + getViewCount() + " testIterations=" + getRunTimes());
mStatusTextView.setText("depth=" + mDepth + " viewsPerNode=" + mNumChildrenPerNode + " totalViews=" + getViewCount() + " testIterations=" + getRunTimes());
}

// Modulate based on number of nodes, so we don't ever quite overload the system
Expand Down Expand Up @@ -154,7 +154,10 @@ public void run() {
long total = 0;
for (int a = 0; a < numTimes; a++) {
start = System.nanoTime();
mContainer.findViewById(mId); // Find past the FURTHEST id

// Find past the FURTHEST id, so it has to scan all the nodes and then fails
mContainer.findViewById(mId);

end = System.nanoTime();
total += end - start;
}
Expand Down
1 change: 1 addition & 0 deletions FindViewById/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp"
tools:context=".MainActivity"
tools:ignore="MergeRootFrame">

Expand Down

0 comments on commit 9152ed4

Please sign in to comment.