This file contains hidden or 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
use "hw2.sml"; | |
fun test (tests) = | |
let | |
fun assess ([], _) = [] | |
| assess (x::rest, num) = if x then assess(rest,num+1) | |
else Int.toString(num)^""::assess(rest,num+1) | |
val results = assess(tests,1) | |
in | |
case results of [] => "OK" |
This file contains hidden or 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
import time | |
import sys | |
total = int(sys.argv[1]) if len(sys.argv) > 1 else 100 | |
def status_line(num, total): | |
line = "> processed %d of %d files" % (num, total) | |
sys.stdout.write(line) | |
sys.stdout.flush() | |
sys.stdout.write("\b" * (len(line))) |
This file contains hidden or 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
from net.grinder.script.Grinder import grinder | |
def thread_rampup(interval): | |
"""Decorator for waking grinder threads incrementally. | |
Input argument `interval` determines time in ms between wakeup of each thread. | |
Usage: | |
class TestRunner: | |
@thread_rampup(3000) |
This file contains hidden or 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 my.java.package; | |
import net.grinder.plugin.http.HTTPRequest; | |
import net.grinder.script.NotWrappableTypeException; | |
import net.grinder.script.Test; | |
public class MyTestRunner { | |
private HTTPRequest test; |
NewerOlder