Conversation
Tom-Willemsen
left a comment
There was a problem hiding this comment.
I'll give this a more thorough functional test tomorrow...
| - name: install curl-dev | ||
| if: ${{ matrix.os == 'ubuntu-latest' }} | ||
| run: sudo apt-get install -y libcurl4-openssl-dev |
There was a problem hiding this comment.
Not saying this is wrong, but an alternative that avoids system dependencies is:
[target.'cfg(windows)'.dependencies]
rdkafka = { version="0.39.0", features = ["cmake_build"] }
[target.'cfg(unix)'.dependencies]
rdkafka = { version="0.39.0", features = ["cmake_build", "curl", "ssl-vendored"] }
| } | ||
| } | ||
| counter += 1; | ||
| if (num_messages.is_some() && counter == num_messages.unwrap()) |
There was a problem hiding this comment.
| if (num_messages.is_some() && counter == num_messages.unwrap()) | |
| if Some(counter) == num_messages |
and similar elsewhere?
|
|
||
| let start_time = SystemTime::now() | ||
| .duration_since(SystemTime::UNIX_EPOCH) | ||
| .unwrap() |
There was a problem hiding this comment.
Just generally: please try to avoid bare unwrap() - it gives almost no context.
Prefer .expect("some reason why this can never fail") for truly infallible operations, or Result for anything that can legitimately fail.
| fbb.finished_data() | ||
| } | ||
|
|
||
| #[allow(clippy::too_many_arguments)] |
There was a problem hiding this comment.
I know this is pretty much exactly how I'd written it in the python too, with a zillion arguments, but I think the more extensible approach is to pull all of the "howl config" arguments into a HowlConfig struct, instantiated once in main, and passed through as &HowlConfig to anywhere that needs it.
This avoids multiple methods all taking a similar huge list of arguments.
| mut current_job_id: String, | ||
| ) -> String { |
There was a problem hiding this comment.
If you take a mutable reference you could avoid needing to return the new String here.
| det_max: i32, | ||
| mut current_job_id: String, | ||
| ) -> String { | ||
| // get currnet time |
There was a problem hiding this comment.
| // get currnet time | |
| // get current time |
|
|
||
| for _ in 0..messages_per_frame { | ||
| match producer.send( | ||
| BaseRecord::to(format!("{topic_prefix}_rawEvents").as_str()) |
There was a problem hiding this comment.
Does just:
| BaseRecord::to(format!("{topic_prefix}_rawEvents").as_str()) | |
| BaseRecord::to(&format!("{topic_prefix}_rawEvents")) |
work?
| println!("Each ev44 is {ev44_size} bytes"); | ||
|
|
||
| let producer: ThreadedProducer<DefaultProducerContext> = ClientConfig::new() | ||
| .set("bootstrap.servers", broker) |
There was a problem hiding this comment.
How fast were you able to howl with just this?
Convert saluki to rust.
Changes to note:
listenandconsumehave been merged, as they were quite similar anyway. README and--helpshould clarify how to useconsume(which is aliased tolistenfor muscle memory's sake!)playhas not been carried over as I ran out of time to be able to call this personal development. rewriteplayin rust #50 exists to add it when we need to use it again.howlis a bit faster than python, though I haven't tried the "cheat" way of only constructing one set of det values but sending them x times a frame.also note that the CI is currently failing at the time of writing but only because one of the apt mirrors seems to be 404ing?working nowI may also need a hand benchmarking
howlplz @Tom-Willemsen