summaryrefslogtreecommitdiff
path: root/caching-tests/bench.ur
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-17 04:08:12 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-17 04:08:12 -0500
commitde5089fc5dfb8904ad3a8e36f042ce234ac9340b (patch)
treecee1595f198ba7db55df574115f548815cf60c02 /caching-tests/bench.ur
parent39804bcf37a35ca6a2cb5e49849ce9453c9025bc (diff)
Ran a benchmark!
Diffstat (limited to 'caching-tests/bench.ur')
-rw-r--r--caching-tests/bench.ur10
1 files changed, 1 insertions, 9 deletions
diff --git a/caching-tests/bench.ur b/caching-tests/bench.ur
index 0c7bb674..d9c298c8 100644
--- a/caching-tests/bench.ur
+++ b/caching-tests/bench.ur
@@ -3,6 +3,7 @@ table tab : {Id : int, Val : int} PRIMARY KEY Id
fun check id =
res <- oneOrNoRows (SELECT tab.Val FROM tab WHERE tab.Id = {[id]});
return <xml><body>
+ cache
{case res of
None => <xml>?</xml>
| Some row => <xml>{[row.Tab.Val]}</xml>}
@@ -13,12 +14,3 @@ fun flush id =
return <xml><body>
Changed {[id]}!
</body></xml>
-
-fun main x y =
- r <- rand;
- let
- val id = r % x
- val doFlush = (r / x) % y = 0
- in
- if doFlush then flush id else check id
- end