Skip to content

Commit

Permalink
txsource/queries: workload doing various queries
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Mar 20, 2020
1 parent 908195f commit 525bfad
Show file tree
Hide file tree
Showing 11 changed files with 463 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .changelog/2769.feature.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
txsource/queries: workload doing historical queries

Queries workload continuously performs various historic queries using the
exposed APIs and makes sure the responses make sense.
6 changes: 1 addition & 5 deletions go/oasis-node/cmd/debug/txsource/txsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
cmdFlags "github.com/oasislabs/oasis-core/go/oasis-node/cmd/common/flags"
cmdGrpc "github.com/oasislabs/oasis-core/go/oasis-node/cmd/common/grpc"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/txsource/workload"
runtimeClient "github.com/oasislabs/oasis-core/go/runtime/client/api"
)

const (
Expand Down Expand Up @@ -95,9 +94,6 @@ func doRun(cmd *cobra.Command, args []string) error {
// Set up the consensus client.
cnsc := consensus.NewConsensusClient(conn)

// Set up the runtime client.
rtc := runtimeClient.NewRuntimeClient(conn)

// Wait for sync before transferring control to the workload.
ncc := api.NewNodeControllerClient(conn)
logger.Debug("waiting for node sync")
Expand All @@ -120,7 +116,7 @@ func doRun(cmd *cobra.Command, args []string) error {
}

logger.Debug("entering workload", "name", name)
if err = w.Run(ctx, rng, conn, cnsc, rtc, fundingAccount); err != nil {
if err = w.Run(ctx, rng, conn, cnsc, fundingAccount); err != nil {
logger.Error("workload error", "err", err)
return fmt.Errorf("workload %s: %w", name, err)
}
Expand Down
2 changes: 0 additions & 2 deletions go/oasis-node/cmd/debug/txsource/workload/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/oasislabs/oasis-core/go/common/logging"
consensus "github.com/oasislabs/oasis-core/go/consensus/api"
"github.com/oasislabs/oasis-core/go/consensus/api/transaction"
runtimeClient "github.com/oasislabs/oasis-core/go/runtime/client/api"
staking "github.com/oasislabs/oasis-core/go/staking/api"
)

Expand Down Expand Up @@ -178,7 +177,6 @@ func (d *delegation) Run(
rng *rand.Rand,
conn *grpc.ClientConn,
cnsc consensus.ClientBackend,
rtc runtimeClient.RuntimeClient,
fundingAccount signature.Signer,
) error {
var err error
Expand Down
2 changes: 0 additions & 2 deletions go/oasis-node/cmd/debug/txsource/workload/oversized.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/oasislabs/oasis-core/go/common/logging"
consensus "github.com/oasislabs/oasis-core/go/consensus/api"
"github.com/oasislabs/oasis-core/go/consensus/api/transaction"
runtimeClient "github.com/oasislabs/oasis-core/go/runtime/client/api"
staking "github.com/oasislabs/oasis-core/go/staking/api"
)

Expand All @@ -33,7 +32,6 @@ func (oversized) Run(
rng *rand.Rand,
conn *grpc.ClientConn,
cnsc consensus.ClientBackend,
rtc runtimeClient.RuntimeClient,
fundingAccount signature.Signer,
) error {
txSignerFactory := memorySigner.NewFactory()
Expand Down
2 changes: 0 additions & 2 deletions go/oasis-node/cmd/debug/txsource/workload/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/oasislabs/oasis-core/go/common/logging"
consensus "github.com/oasislabs/oasis-core/go/consensus/api"
"github.com/oasislabs/oasis-core/go/consensus/api/transaction"
runtimeClient "github.com/oasislabs/oasis-core/go/runtime/client/api"
staking "github.com/oasislabs/oasis-core/go/staking/api"
)

Expand All @@ -39,7 +38,6 @@ func (parallel) Run(
rng *rand.Rand,
conn *grpc.ClientConn,
cnsc consensus.ClientBackend,
rtc runtimeClient.RuntimeClient,
fundingAccount signature.Signer,
) error {
ctx := context.Background()
Expand Down
Loading

0 comments on commit 525bfad

Please sign in to comment.