celestiaorg / knuu

Integration Test Framework
Apache License 2.0
39 stars 34 forks source link

Add support for profiling #441

Open rach-id opened 3 months ago

rach-id commented 3 months ago

It would be good to support profiling by knuu so that we can get CPU profiles in realistic setups.

The CPU profiles can be activated when starting a Celestia-app using the --cpu-profile <file_name> which will put the data in the <file_name>.

Also, we can think about a way to get that data ready to be used via uploading it somewhere.

mojtaba-esk commented 3 months ago

If you wanna download a file from an instance there are multiple ways:

  1. Store it in a shared volume with a sidecar and the sidecar runs a script to push it to some s3 bucket somewhere. Just like what is being done with tshark-uploader.
  2. If the file does not have to be persisted after the test run, we can also activate Minio in knuu and push it there and after the test is done, download the file to our machine. Still needs a sidecar to push it to Minio.
  3. Download the file directly from the instance. Using one of the following funcs:

func (i *Instance) GetFileBytes(ctx context.Context, file string) ([]byte, error)

func (i *Instance) ReadFileFromRunningInstance(ctx context.Context, filePath string) (io.ReadCloser, error)

smuu commented 2 months ago

@rach-id is this still a needed request?