Skip to content

Commit

Permalink
Merge pull request #49 from pinecone-io/tidy_name
Browse files Browse the repository at this point in the history
Adjust Type column to align 'Pinecone gRPC' correctly
  • Loading branch information
daverigby authored Feb 29, 2024
2 parents e169585 + 85b286c commit 53bd554
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from locust.env import Environment
from locust.exception import StopUser
from locust.runners import Runner, WorkerRunner
import locust.stats
from locust.user.task import DefaultTaskSet, TaskSet
import logging
import numpy as np
Expand Down Expand Up @@ -375,11 +376,15 @@ def __init__(self, environment, use_grpc : bool = False):
self.host = environment.host

if use_grpc:
self.request_type="Pine gRPC"
self.request_type="Pinecone gRPC"
self.pinecone = PineconeGRPC(apikey)
else:
self.request_type="Pine"
self.request_type="Pinecone"
self.pinecone = Pinecone(apikey)
# Ensure stats 'Type' column is wide enough for our chosen mode so
# tables render correctly aligned (by default is only 8 chars wide).
locust.stats.STATS_TYPE_WIDTH = len(self.request_type) + 1

self.index = self.pinecone.Index(host=self.host)

def query(self, name: str, q_vector: list, top_k: int, q_filter=None, namespace=None):
Expand Down

0 comments on commit 53bd554

Please sign in to comment.