Skip to content

Commit

Permalink
go/runtime/scheduling: Remove unused txpool implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Oct 21, 2020
1 parent cc5da3f commit a99f9c5
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 583 deletions.
6 changes: 0 additions & 6 deletions go/runtime/scheduling/simple/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import (
registry "github.com/oasisprotocol/oasis-core/go/registry/api"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/api"
txpool "github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/api"
mapp "github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/map"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/orderedmap"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/queue"
)

const (
Expand Down Expand Up @@ -158,10 +156,6 @@ func New(txPoolImpl string, maxTxPoolSize uint64, params registry.TxnSchedulerPa
}
var pool txpool.TxPool
switch txPoolImpl {
case queue.Name:
pool = queue.New(poolCfg)
case mapp.Name:
pool = mapp.New(poolCfg)
case orderedmap.Name:
pool = orderedmap.New(poolCfg)
default:
Expand Down
26 changes: 1 addition & 25 deletions go/runtime/scheduling/simple/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import (
"github.com/stretchr/testify/require"

registry "github.com/oasisprotocol/oasis-core/go/registry/api"
mapp "github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/map"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/orderedmap"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/simple/txpool/queue"
"github.com/oasisprotocol/oasis-core/go/runtime/scheduling/tests"
)

Expand All @@ -18,34 +16,12 @@ func TestSimpleScheduler(t *testing.T) {
MaxBatchSize: 10,
MaxBatchSizeBytes: 16 * 1024 * 1024,
}
algo, err := New(queue.Name, 100, params)
algo, err := New(orderedmap.Name, 100, params)
require.NoError(t, err, "New()")

tests.SchedulerImplementationTests(t, algo)
}

func BenchmarkSimpleSchedulerQueue(b *testing.B) {
params := registry.TxnSchedulerParameters{
Algorithm: Name,
MaxBatchSize: 100,
MaxBatchSizeBytes: 16 * 1024 * 1024,
}
algo, err := New(queue.Name, 1000000, params)
require.NoError(b, err, "New()")
tests.SchedulerImplementationBenchmarks(b, algo)
}

func BenchmarkSimpleSchedulerMap(b *testing.B) {
params := registry.TxnSchedulerParameters{
Algorithm: Name,
MaxBatchSize: 100,
MaxBatchSizeBytes: 16 * 1024 * 1024,
}
algo, err := New(mapp.Name, 1000000, params)
require.NoError(b, err, "New()")
tests.SchedulerImplementationBenchmarks(b, algo)
}

func BenchmarkSimpleSchedulerOrderedMap(b *testing.B) {
params := registry.TxnSchedulerParameters{
Algorithm: Name,
Expand Down
241 changes: 0 additions & 241 deletions go/runtime/scheduling/simple/txpool/map/incoming_map.go

This file was deleted.

26 changes: 0 additions & 26 deletions go/runtime/scheduling/simple/txpool/map/incomming_map_test.go

This file was deleted.

Loading

0 comments on commit a99f9c5

Please sign in to comment.