Skip to content

benchmark: build fail and test fail. #664

@Dog-Du

Description

@Dog-Du

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'benchmark'
  2. Run 'cargo build'
  3. See error
    Expected behavior
    compile and no error:

Additional context

build fail

❯ cargo build
   Compiling benchmark v0.1.0 (~/grpc-rs/benchmark)
error: cannot find derive macro `Parser` in this scope
  --> benchmark/src/main.rs:23:10
   |
23 | #[derive(Parser)]
   |          ^^^^^^
   |
note: `Parser` is imported here, but it is only a trait, without a derive macro
  --> benchmark/src/main.rs:12:5
   |
12 | use clap::Parser;
   |     ^^^^^^^^^^^^

error: cannot find attribute `arg` in this scope
  --> benchmark/src/main.rs:26:7
   |
26 |     #[arg(long)]
   |       ^^^

error[E0599]: no function or associated item named `parse` found for struct `WorkerCli` in the current scope
  --> benchmark/src/main.rs:31:26
   |
24 | struct WorkerCli {
   | ---------------- function or associated item `parse` not found for this struct
...
31 |     let cli = WorkerCli::parse();
   |                          ^^^^^ function or associated item not found in `WorkerCli`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `parse`, perhaps you need to implement one of them:
           candidate #1: `Parser`
           candidate #2: `TypedValueParser`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `benchmark` (bin "qps_worker") due to 3 previous errors

we need to add derive feature when importing clag

test fail

++ dirname tools/run_tests/performance/run_worker_rust.sh
+ cd tools/run_tests/performance/../../..
+ ../grpc-rs/target/release/qps_worker --driver_port=10110
error: unexpected argument '--driver_port' found

  tip: a similar argument exists: '--driver-port'

Usage: qps_worker <DRIVER_PORT0|--driver-port <driver-port>>

For more information, try '--help'.

we need to support the --driver_port

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions