#community-help

Creating URLs for CPU Spike Test with Typesense

TLDR Mubashirullah requested help with creating urls for a CPU spike test using Typesense. Kishore Nallan guided them through the process, directing them to the necessary documentation and confirming how to format the get query. Mubashirullah successfully figured out the solution with the given guidance.

Powered by Struct AI
10
21mo
Solved
Join the chat
Dec 23, 2021 (21 months ago)
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
11:48 AM
I'm creating a url.txt file for seige to test the cpu spike on our dataset. Can someone give me some guidance on how to create these urls? So far I was working with the python library and know how to use that.

# ${TYPESENSE_HOST}/collections/:collection/documents/search


Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:50 AM
Check the shell tab on all the examples in the docs.
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
12:04 PM
I make a url.txt file and each line contains something like this without the curl?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:08 PM
Yes but in the get query format. The above example uses multi_search which uses post request.
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
12:34 PM
curl -H "X-TYPESENSE-API-KEY: Hu52dwsas2AdxdE" \
"\
filter_by=status:=[Cancelled]&sort_by=sortable_id:asc"
12:34
Mubashirullah
12:34 PM
This is so cool. It worked. How do I do it on the browser now.
12:35
Mubashirullah
12:35 PM
it ends up searching on google
01:32
Mubashirullah
01:32 PM
Ive figured it out.
I can enter the header in the commandline. So just the http part in the url file and then run
seige -H "X-TYPESENSE-API-KEY: Hu52dwsas2AdxdE" 
01:32
Mubashirullah
01:32 PM
Thank you for your help ❤️