commit | 4db55f0ca2b909c46223aad95ef977ae50b1d863 | [log] [tgz] |
---|---|---|
author | Ken Ashcraft <kash@google.com> | Fri Jul 25 15:53:01 2014 -0700 |
committer | Ken Ashcraft <kash@google.com> | Fri Jul 25 15:53:03 2014 -0700 |
tree | db3375293347972756394168b99dc5a2f7371998 | |
parent | 4b0dfa08a9af6f3bcc5ec3df2f322ce1cd71bce7 [diff] |
veyron/services/store/memstore/query: Add sample() function. The sample() function randomly samples the stream of results using reservoir sampling. sample() takes a single integer argument specifying the number of samples to return. I plan to use this function in the Store codelab to randomly select a fortune. Change-Id: I574a0fef77cff4fe602c1b300c80c5be33318fef