1. 20 Jun, 2016 1 commit
  2. 11 Feb, 2015 1 commit
    • antirez's avatar
      SPOP: reimplemented for speed and better distribution. · 9feee428
      antirez authored
      The old version of SPOP with "count" argument used an API call of dict.c
      which was actually designed for a different goal, and was not capable of
      good distribution. We follow a different three-cases approach optimized
      for different ratiion between sets and requested number of elements.
      
      The implementation is simpler and allowed the removal of a large amount
      of code.
      9feee428
  3. 23 Dec, 2014 1 commit
    • Matt Stancliff's avatar
      Allow all code tests to run using Redis args · 8febcffd
      Matt Stancliff authored
      Previously, many files had individual main() functions for testing,
      but each required being compiled with their own testing flags.
      That gets difficult when you have 8 different flags you need
      to set just to run all tests (plus, some test files required
      other files to be compiled aaginst them, and it seems some didn't
      build at all without including the rest of Redis).
      
      Now all individual test main() funcions are renamed to a test
      function for the file itself and one global REDIS_TEST define enables
      testing across the entire codebase.
      
      Tests can now be run with:
        - `./redis-server test <test>`
      
        e.g. ./redis-server test ziplist
      
      If REDIS_TEST is not defined, then no tests get included and no
      tests are included in the final redis-server binary.
      8febcffd
  4. 14 Dec, 2014 1 commit
    • Alon Diamant's avatar
      Added <count> parameter to SPOP: · 28802887
      Alon Diamant authored
      spopCommand() now runs spopWithCountCommand() in case the <count> param is found.
      Added intsetRandomMembers() to Intset: Copies N random members from the set into inputted 'values' array. Uses either the Knuth or Floyd sample algos depending on ratio count/size.
      Added setTypeRandomElements() to SET type: Returns a number of random elements from a non empty set. This is a version of setTypeRandomElement() that is modified in order to return multiple entries, using dictGetRandomKeys() and intsetRandomMembers().
      Added tests for SPOP with <count>: unit/type/set, unit/scripting, integration/aof
      --
      Cleaned up code a bit to match with required Redis coding style
      28802887
  5. 08 Nov, 2012 1 commit
  6. 28 Feb, 2011 1 commit
  7. 09 Dec, 2010 1 commit