Mercurial > hg > Members > tatsuki > Alice
changeset 238:e4a5da56b394
minor change
author | sugi |
---|---|
date | Mon, 08 Apr 2013 15:29:24 +0900 |
parents | 2a019206c2f0 |
children | 918bdc3ed11f |
files | src/alice/test/codesegment/api/PeekCodeSegment.java src/alice/test/codesegment/api/StartCodeSegment.java |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/test/codesegment/api/PeekCodeSegment.java Mon Apr 01 03:41:02 2013 +0900 +++ b/src/alice/test/codesegment/api/PeekCodeSegment.java Mon Apr 08 15:29:24 2013 +0900 @@ -12,11 +12,11 @@ @Override public void run() { - if (StartCodeSegment.count>1000){ + if (StartCodeSegment.count>10000){ System.out.println(System.currentTimeMillis()-StartCodeSegment.t +" ms"); StartCodeSegment.count = 0; - if (++StartCodeSegment.cnt>1000){ + if (++StartCodeSegment.cnt>100){ System.exit(0); } } else {
--- a/src/alice/test/codesegment/api/StartCodeSegment.java Mon Apr 01 03:41:02 2013 +0900 +++ b/src/alice/test/codesegment/api/StartCodeSegment.java Mon Apr 08 15:29:24 2013 +0900 @@ -1,6 +1,9 @@ package alice.test.codesegment.api; +import java.util.Random; + import alice.codesegment.CodeSegment; +import alice.test.codesegment.local.bitonicsort.DataList; public class StartCodeSegment extends CodeSegment { String[] args; @@ -35,8 +38,15 @@ } else if ("-peek".equals(args[i])){ System.out.println("start peek Test"); String key = "peek"; - ods.put(key, key); + int size = 100000; + DataList list = new DataList(size); + Random rnd = new Random(); + for (int cnt = 0; cnt < size; cnt++){ + list.table[cnt] = rnd.nextInt(100000)+10; + } + ods.put(key, list); new PeekCodeSegment(key); + }