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

New Project: Load Testing CLI utility #6

Closed
skycoin-manager opened this issue Jan 22, 2018 · 5 comments
Closed

New Project: Load Testing CLI utility #6

skycoin-manager opened this issue Jan 22, 2018 · 5 comments

Comments

@skycoin-manager
Copy link
Contributor

1> Create a folder called load-testing

put documentation in .md in the folder

You will create a command line utility that

  • runs on command line
  • takes in skycoin "seed" on command line to generate skycoin addresses
  • takes in a parameter n for number of addresses to generate from the seed
  • sends coins randomly between addresses in the list of generated address (creates transactions, injects transactions, tracks the status of the transactions, then repeats)
  • has a parameter to configure for time between transactions in seconds

Print on the command line each event, status, etc

Also,

  • make a blog post on github.com/skycoin/skycoin.net or github.com/skycoin/docs
  • document
    -- how to generate skycoin addresses from a seed
    -- how to check skycoin balances programmatic ally
    -- how to sign a transaction
    -- how to check the status of a transaction

2> Use the cipher library to generate skycoin addresses from seed

https://godoc.org/github.com/skycoin/skycoin/src/cipher

func GenerateDeterministicKeyPairs(seed []byte, n int) []SecKey
^ generate addresses from seed, input string

type Address
func AddressFromSecKey(secKey SecKey) Address
^ generate a skycoin address from a seed

3> Create a command line utility that connects to a skycoin node

  • see github.com/skycoin/skycoin/cmd/skycoin for CLI library usage, format
  • see the skycoin CLI in gitbub.com/skycoin /cmd/cli for example of how to get unspent outputs/balance for an address, how to create a transaction and how to track the status of a transaction

4>

  • look at the list of addresses generated
  • find which addresses have balances (unspent outputs)
  • create random transaction sending from an address to 2 other addresses in the list (splitting the coins) (split)
  • also have random transactions that take coins from two addresses and send them to a randomly chosen address (merge)
  • inject the transaction
  • track the status of the transaction and wait for transaction to be completed to create another transaction (in loop, infinitely)
  • have parameter or timer between each transaction (when transaction is attempted and when we attempt to create the next transaction)

3>

Also add a command line parameter "-cleanup" that generates n addresses from seed and does a transaction to send all of the coins in any of the N addresses, to the first address generated by the seed.

@skycoin-manager skycoin-manager changed the title Load Balancing CLI utility New Project: Load Balancing CLI utility Jan 22, 2018
@skycoin-manager skycoin-manager changed the title New Project: Load Balancing CLI utility New Project: Load Testing CLI utility Jan 22, 2018
@nutmix
Copy link
Contributor

nutmix commented Jan 25, 2018

Additional notes from discussion with brandon:

  1. Add this utility under a folder in skycoin/services repo
  2. Skycoin seeds are any ascii character or byte array.
  3. The intial coins for the test script need to be loaded into address/seed/wallet. (by hand?)
  4. The script should abort if no coins.
  5. It may be possible to extended this utility to include the functionality of New Project: Transaction Policy Test #7 later.
  6. print output to console by default.
  7. add command line option to send to log file and log files name.
  8. It should use the go language (of course)
  9. It should be runable on OS X, linux, and ideally windows.
  10. detailed instructions on how to build, run and use should be included in the projects README.md file with some examples.
  11. suggested output for each transaction should include:
    1. from address
    2. to address
    3. amount
    4. start time
    5. end time
    6. elapsed time
    7. status
  12. Nice to have: output a summary on termination of the following:
    1. Test start time
    2. Test end time
    3. Total number of transactions
    4. Number of failed transactions
    5. Min transaction time
    6. Max transaction time
    7. Average transaction time
    8. Clean up address (if -cleanup used)
  13. two command line flags to enable/disable each of the transaction output and/or the summary output.
  14. Suggest making the output readable and parseable e.g. by using "," or "TAB" as the separator, and putting any strings with spaces or the separator char in quotes (or avoid those chars)

@skycoin-karl
Copy link
Contributor

Working on this right now. Will be finished in < 2 days.

@nutmix
Copy link
Contributor

nutmix commented Feb 1, 2018

Steve recommends testing this against the latest skycoin/skycoin on the develop branch.

@skycoin-karl
Copy link
Contributor

@nutmix That's the plan, however, I've run into a pretty nasty bug and am currently looking for the fix.

Once that bug and fixed the load-testing utility will be good to go.

@skycoin-manager
Copy link
Contributor Author

Should run on windows

This is a lie. Anyone with a golang installation can run any golang program (they are cross platform). We do not support windows and none of the developers are on windows and windows does not have a command line, so windows support is pointless.

OSX and Linux are identical with respect to golang command line applications.

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

No branches or pull requests

3 participants