Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/oasis-node/txsource: add parallel workload #2724

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Feb 25, 2020

Adds parallel txsource workload (part of: #2506)

@ptrus ptrus force-pushed the ptrus/feature/txsource-parallel branch 3 times, most recently from 7e6a2cc to 366c2ff Compare February 26, 2020 08:39
@ptrus ptrus requested a review from pro-wh as a code owner February 26, 2020 08:39
@ptrus ptrus force-pushed the ptrus/feature/txsource-parallel branch from 366c2ff to 572761e Compare February 26, 2020 08:40
return fmt.Errorf("workload parallel: error submiting transaction: %w", err)

case <-waitC:
parallelLogger.Debug("all transfers successfull",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parallelLogger.Debug("all transfers successfull",
parallelLogger.Debug("all transfers successful",

var err error
fac := memorySigner.NewFactory()
for i := range accounts {
accounts[i], err = fac.Generate(signature.SignerEntity, rng)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these accounts don't need any balance as they don't include any fees? If (when) you need fees, you would need to make sure to include accounts in genesis (defined in the txsource E2E test).

An alternative way (to avoid having each workload to include new accounts in genesis for the default seed) would be to only have a single (known, seed-independent) account in genesis and txsource support for funding workloads on start (e.g., a simple API to transfer into arbitrary accounts before the workload main loop starts).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't test networks include the test entity?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah agreed and makes sense. Maybe it would be nicer if I do that in a separate PR though as it will also affect other workloads (at least the transfer one), and I can for now just keep Fees to zero here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah definitely in a separate PR. Could use the test entity for this yeah 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

wg.Add(parallelConcurency)

for i := 0; i < parallelConcurency; i++ {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty line.

@ptrus ptrus force-pushed the ptrus/feature/txsource-parallel branch from 572761e to 4c6f699 Compare February 26, 2020 12:04
@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #2724 into master will increase coverage by 0.3%.
The diff coverage is 67.24%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2724     +/-   ##
=========================================
+ Coverage    62.9%   63.21%   +0.3%     
=========================================
  Files         382      379      -3     
  Lines       36036    35596    -440     
=========================================
- Hits        22670    22501    -169     
+ Misses      10502    10273    -229     
+ Partials     2864     2822     -42
Impacted Files Coverage Δ
...oasis-node/cmd/debug/txsource/workload/parallel.go 67.24% <67.24%> (ø)
go/worker/common/p2p/p2p.go 61.71% <0%> (-9.46%) ⬇️
go/oasis-node/cmd/common/flags/flags.go 85.71% <0%> (-9.03%) ⬇️
go/common/grpc/proxy/proxy.go 58.87% <0%> (-5.61%) ⬇️
...n/crypto/signature/signers/memory/memory_signer.go 71.42% <0%> (-4.77%) ⬇️
go/worker/storage/service_external.go 47.31% <0%> (-4.31%) ⬇️
go/consensus/tests/tester.go 90.47% <0%> (-3.81%) ⬇️
go/oasis-node/cmd/signer/signer.go 36.36% <0%> (-2.77%) ⬇️
go/consensus/tendermint/roothash/roothash.go 68.91% <0%> (-2.63%) ⬇️
go/oasis-node/cmd/common/common.go 55.72% <0%> (-1.78%) ⬇️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8e4381...50605e1. Read the comment docs.

@ptrus ptrus force-pushed the ptrus/feature/txsource-parallel branch from 4c6f699 to 50605e1 Compare February 27, 2020 14:21
@codecov
Copy link

codecov bot commented Feb 27, 2020

Codecov Report

Merging #2724 into master will increase coverage by 0.3%.
The diff coverage is 67.24%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2724     +/-   ##
=========================================
+ Coverage    62.9%   63.21%   +0.3%     
=========================================
  Files         382      379      -3     
  Lines       36036    35596    -440     
=========================================
- Hits        22670    22501    -169     
+ Misses      10502    10273    -229     
+ Partials     2864     2822     -42
Impacted Files Coverage Δ
...oasis-node/cmd/debug/txsource/workload/parallel.go 67.24% <67.24%> (ø)
go/worker/common/p2p/p2p.go 61.71% <0%> (-9.46%) ⬇️
go/oasis-node/cmd/common/flags/flags.go 85.71% <0%> (-9.03%) ⬇️
go/common/grpc/proxy/proxy.go 58.87% <0%> (-5.61%) ⬇️
...n/crypto/signature/signers/memory/memory_signer.go 71.42% <0%> (-4.77%) ⬇️
go/worker/storage/service_external.go 47.31% <0%> (-4.31%) ⬇️
go/consensus/tests/tester.go 90.47% <0%> (-3.81%) ⬇️
go/oasis-node/cmd/signer/signer.go 36.36% <0%> (-2.77%) ⬇️
go/consensus/tendermint/roothash/roothash.go 68.91% <0%> (-2.63%) ⬇️
go/oasis-node/cmd/common/common.go 55.72% <0%> (-1.78%) ⬇️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8e4381...50605e1. Read the comment docs.

@ptrus ptrus merged commit cc3f2ff into master Feb 27, 2020
@ptrus ptrus deleted the ptrus/feature/txsource-parallel branch February 27, 2020 16:47
@ptrus ptrus self-assigned this Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants