Last active
January 22, 2016 03:58
-
-
Save lanzafame/ca0e0f986384bbf6cb6d to your computer and use it in GitHub Desktop.
Java vs Golang AWS t2.micro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in `seq 1 15`; | |
do | |
java8 -cp . Test // or in the go case: ./test | |
sleep 30 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
list := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} | |
for _, s := range list { | |
time.Sleep(40000 * time.Millisecond) | |
fmt.Println(s) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test { | |
public static void main(String[] args) throws InterruptedException { | |
String numberList[] = { | |
"1", | |
"2", | |
"3", | |
"4", | |
"5", | |
"6", | |
"7", | |
"8", | |
"9", | |
"10" | |
}; | |
for (String s : numberList) { | |
Thread.sleep(40000); | |
System.out.println(s); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment