Skip to content

Commit

Permalink
Lab 4 Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerie Kwek authored and Valerie Kwek committed Dec 1, 2024
1 parent 547bed3 commit 5fa6ea2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions godb/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,29 @@ func TestTransactionFiveThreads(t *testing.T) {
validateTransactions(t, 5)
}

// Results:
// OCC - 10000: 1.321s, 15000: 2.825s, 20000: 4.685s, 25000: 7.616s, 30000: 11.300s
// 2PL - 10000: 5.695s, 15000: 7.823s, 20000: 15.074s, 25000: 17.451s, 30000: 26.546s
func TestTransaction10000(t *testing.T) {
validateTransactions(t, 10000)
}

func TestTransaction15000(t *testing.T) {
validateTransactions(t, 15000)
}

func TestTransaction20000(t *testing.T) {
validateTransactions(t, 20000)
}

func TestTransaction25000(t *testing.T) {
validateTransactions(t, 25000)
}

func TestTransaction30000(t *testing.T) {
validateTransactions(t, 30000)
}

func TestTransactionAllDirtyFails(t *testing.T) {
if os.Getenv("LAB") == "5" {
t.Skip("Test is valid up through Lab 4. Skipping.")
Expand Down

0 comments on commit 5fa6ea2

Please sign in to comment.