Skip to content

Commit

Permalink
- lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laststylebender14 committed Oct 25, 2024
1 parent fcc9474 commit c89ba05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/data_loader/dedupe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<K: Key, V: Value> Dedupe<K, V> {

fn step(&self, key: &K, thread_id: &ThreadId) -> Step<V> {
// Fast path: Try read-only access first
if let Some(inner_data) = self.cache.get(&thread_id) {
if let Some(inner_data) = self.cache.get(thread_id) {
if let Some(state) = inner_data.get(key) {
match state {
State::Ready(value) => return Step::Return(value.clone()),
Expand All @@ -119,7 +119,7 @@ impl<K: Key, V: Value> Dedupe<K, V> {
let (tx, _) = broadcast::channel(self.size);
let tx = Arc::new(tx);

if let Some(mut inner_data) = self.cache.get_mut(&thread_id) {
if let Some(mut inner_data) = self.cache.get_mut(thread_id) {
inner_data.insert(key.to_owned(), State::Pending(Arc::downgrade(&tx)));
return Step::Init(tx);
}
Expand Down

1 comment on commit c89ba05

@github-actions
Copy link

Choose a reason for hiding this comment

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

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 8.32ms 2.73ms 32.40ms 73.90%
Req/Sec 3.03k 367.84 4.24k 81.33%

362154 requests in 30.02s, 1.82GB read

Requests/sec: 12062.94

Transfer/sec: 61.92MB

Please sign in to comment.