Skip to main content

eval_test.go

eval_test.go - Overview

This file contains integration tests for the eval package, verifying the functionality of various DiceDB commands by testing their execution and output against expected results.

Detailed Documentation

Type: evalTestCase

type evalTestCase struct {
name string
setup func()
input []string
output []byte
newValidator func(output interface{})
migratedOutput EvalResponse
}
  • Purpose: Defines a test case structure for evaluating DiceDB commands.
  • Properties:
    • name: A descriptive name for the test case.
    • setup: A function to set up the store's state before the test.
    • input: A slice of strings representing the command and its arguments.
    • output: A byte slice representing the expected raw output from the command.
    • newValidator: A function to validate the output after the test.
    • migratedOutput: An EvalResponse containing the expected result and error after command migration.

Type: evalMultiShardTestCase

type evalMultiShardTestCase struct {
name string
setup func()
input *cmd.DiceDBCmd
validator func(output interface{})
output EvalResponse
}
  • Purpose: Defines a test case structure specifically for evaluating multi-shard DiceDB commands.
  • Properties:
    • name: A descriptive name for the test case.
    • setup: A function to set up the store's state before the test.
    • input: A pointer to a cmd.DiceDBCmd struct representing the command and its arguments.
    • validator: A function to validate the output after the test.
    • output: An EvalResponse containing the expected result and error.

Function: setupTest

func setupTest(store *dstore.Store) *dstore.Store {
dstore.Reset(store)
return store
}
  • Purpose: Resets the provided dstore.Store to a clean state.
  • Parameters:
    • store: A pointer to the dstore.Store to be reset.
  • Returns: A pointer to the reset dstore.Store.

Function: TestEval

func TestEval(t *testing.T) {
// ... test functions calls
}
  • Purpose: Main test function that calls individual test functions for different DiceDB commands.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
  • Returns: None.

Function: testEvalPING

func testEvalPING(t *testing.T, store *dstore.Store) {
// ... test definitions and runEvalTests call
}
  • Purpose: Tests the evalPING function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalECHO

func testEvalECHO(t *testing.T, store *dstore.Store) {
// ... test definitions and runEvalTests call
}
  • Purpose: Tests the evalECHO function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHELLO

func testEvalHELLO(t *testing.T, store *dstore.Store) {
// ... test definitions and runEvalTests call
}
  • Purpose: Tests the evalHELLO function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalSET

func testEvalSET(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalSET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalGETEX

func testEvalGETEX(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalGETEX function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalGETDEL

func testEvalGETDEL(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalGETDEL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalGET

func testEvalGET(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalGET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalEXPIRE

func testEvalEXPIRE(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalEXPIRE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalEXPIRETIME

func testEvalEXPIRETIME(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalEXPIRETIME function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalEXPIREAT

func testEvalEXPIREAT(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalEXPIREAT function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONARRTRIM

func testEvalJSONARRTRIM(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalJSONARRTRIM function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONARRINSERT

func testEvalJSONARRINSERT(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalJSONARRINSERT function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONARRLEN

func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONARRLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONOBJLEN

func testEvalJSONOBJLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONOBJLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalJSONOBJLEN

func BenchmarkEvalJSONOBJLEN(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalJSONOBJLEN function with varying sizes of JSON objects.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalJSONDEL

func testEvalJSONDEL(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONDEL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONFORGET

func testEvalJSONFORGET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONFORGET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONCLEAR

func testEvalJSONCLEAR(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONCLEAR function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONTYPE

func testEvalJSONTYPE(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONTYPE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONGET

func testEvalJSONGET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONGET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONSET

func testEvalJSONSET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONSET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONNUMMULTBY

func testEvalJSONNUMMULTBY(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONNUMMULTBY function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONARRAPPEND

func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONARRAPPEND function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONTOGGLE

func testEvalJSONTOGGLE(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONTOGGLE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalPTTL

func testEvalPTTL(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalPTTL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalTTL

func testEvalTTL(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalTTL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalDel

func testEvalDel(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalDEL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalPersist

func testEvalPersist(t *testing.T, store *dstore.Store) {
// ... test definitions and runMigratedEvalTests call
}
  • Purpose: Tests the evalPERSIST function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalPFADD

func testEvalPFADD(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalPFADD function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalPFCOUNT

func testEvalPFCOUNT(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalPFCOUNT function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalPFMERGE

func testEvalPFMERGE(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalPFMERGE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHGET

func testEvalHGET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHGET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHGETALL

func testEvalHGETALL(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHGETALL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHMGET

func testEvalHMGET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHMGET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHVALS

func testEvalHVALS(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHVALS function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHSTRLEN

func testEvalHSTRLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHSTRLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHEXISTS

func testEvalHEXISTS(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHEXISTS function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHDEL

func testEvalHDEL(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHDEL function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHSCAN

func testEvalHSCAN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHSCAN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONSTRLEN

func testEvalJSONSTRLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONSTRLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalLPUSH

func testEvalLPUSH(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalLPUSH function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalRPUSH

func testEvalRPUSH(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalRPUSH function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalLPOP

func testEvalLPOP(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalLPOP function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalRPOP

func testEvalRPOP(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalRPOP function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalLLEN

func testEvalLLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalLLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONNUMINCRBY

func testEvalJSONNUMINCRBY(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONNUMINCRBY function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: runEvalTests

func runEvalTests(t *testing.T, tests map[string]evalTestCase, evalFunc func([]string, *dstore.Store) []byte, store *dstore.Store) {
// ...
}
  • Purpose: Helper function to run a series of evaluation tests.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • tests: A map of test case names to evalTestCase structs.
    • evalFunc: The function to be tested.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: runMigratedEvalTests

func runMigratedEvalTests(t *testing.T, tests map[string]evalTestCase, evalFunc func([]string, *dstore.Store) *EvalResponse, store *dstore.Store) {
// ...
}
  • Purpose: Helper function to run a series of evaluation tests that have been migrated.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • tests: A map of test case names to evalTestCase structs.
    • evalFunc: The function to be tested.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: runEvalTestsMultiShard

func runEvalTestsMultiShard(t *testing.T, tests map[string]evalMultiShardTestCase, evalFunc func(*cmd.DiceDBCmd, *dstore.Store) *EvalResponse, store *dstore.Store) {
// ...
}
  • Purpose: Helper function to run a series of multi-shard evaluation tests.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • tests: A map of test case names to evalMultiShardTestCase structs.
    • evalFunc: The function to be tested.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalHSET

func BenchmarkEvalHSET(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalHSET function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalHSET

func testEvalHSET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHSET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHMSET

func testEvalHMSET(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHMSET function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHKEYS

func testEvalHKEYS(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHKEYS function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalHKEYS

func BenchmarkEvalHKEYS(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalHKEYS function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: BenchmarkEvalPFCOUNT

func BenchmarkEvalPFCOUNT(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the evalPFCOUNT function with different HyperLogLog sizes and key combinations.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalDebug

func testEvalDebug(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONDebug function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalHLEN

func testEvalHLEN(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHLEN function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalHLEN

func BenchmarkEvalHLEN(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalHLEN function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalJSONARRPOP

func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONARRPOP function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalTYPE

func testEvalTYPE(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalTYPE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalTYPE

func BenchmarkEvalTYPE(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalTYPE function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalCOMMAND

func testEvalCOMMAND(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalCommand function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalJSONOBJKEYS

func testEvalJSONOBJKEYS(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalJSONOBJKEYS function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalJSONOBJKEYS

func BenchmarkEvalJSONOBJKEYS(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalJSONOBJKEYS function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalGETRANGE

func testEvalGETRANGE(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalGETRANGE function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalGETRANGE

func BenchmarkEvalGETRANGE(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalGETRANGE function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: BenchmarkEvalHSETNX

func BenchmarkEvalHSETNX(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalHSETNX function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalHSETNX

func testEvalHSETNX(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHSETNX function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalHINCRBY

func BenchmarkEvalHINCRBY(b *testing.B) {
// ...
}
  • Purpose: Benchmarks the performance of the evalHINCRBY function.
  • Parameters:
    • b: A pointer to the testing.B object for benchmark management.
  • Returns: None.

Function: testEvalHINCRBY

func testEvalHINCRBY(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalHINCRBY function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: testEvalSETEX

func testEvalSETEX(t *testing.T, store *dstore.Store) {
// ...
}
  • Purpose: Tests the evalSETEX function.
  • Parameters:
    • t: A pointer to the testing.T object for test management.
    • store: A pointer to the dstore.Store to be used for testing.
  • Returns: None.

Function: BenchmarkEvalSETEX

func BenchmarkEvalSETEX(b *testing.B) {
// ...
}
  • Purpose: Bench