Mercurial > hg > Database > Alice
annotate src/main/java/alice/test/codesegment/remote/compress/StartTestCompress.java @ 596:2b8e6b8b5d20 dispose
minor fix
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 10 Feb 2016 20:04:22 +0900 |
parents | 64f1762e2942 |
children | f5322e53bbf6 |
rev | line source |
---|---|
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
1 package alice.test.codesegment.remote.compress; |
590 | 2 |
3 import alice.codesegment.CodeSegment; | |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
4 import javassist.bytecode.ByteArray; |
590 | 5 |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
6 import java.io.*; |
592
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
7 import java.nio.file.Files; |
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
8 import java.nio.file.Path; |
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
9 import java.nio.file.Paths; |
590 | 10 |
11 /** | |
12 * Created by e125769 on 2/9/16. | |
13 */ | |
14 public class StartTestCompress extends CodeSegment{ | |
15 @Override | |
16 public void run() { | |
17 System.out.println("run StartCodeSegment"); | |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
18 |
592
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
19 Path path = Paths.get("./AliceText.txt"); |
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
20 byte[] data = new byte[1024*100]; |
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
21 |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
22 try { |
592
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
23 data = Files.readAllBytes(path); |
10b1235df119
change AliceText.txt
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
591
diff
changeset
|
24 } catch (IOException e) { |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
25 e.printStackTrace(); |
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
26 } |
590 | 27 |
28 TestCompress cs = new TestCompress(100); | |
29 | |
30 long time = System.currentTimeMillis(); | |
31 ods.put("local", "time", time); | |
596 | 32 ods.put("remote", "data", data); |
591
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
33 } |
25fe2f78ac40
add remote compress test
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
590
diff
changeset
|
34 |
590 | 35 } |