wg / wrk

Modern HTTP benchmarking tool
Other
37.97k stars 2.94k forks source link

Process to compile in windows 10/11 #526

Open krishnaTORQUE opened 1 year ago

krishnaTORQUE commented 1 year ago

Hi I would like to know what are process to compile in windows 10/11, if it support. For linux & mac its working fine. Thanks

ksylvan commented 1 year ago

You could use it in WSL2 - in an Ubuntu WSL container, run:

sudo apt install wrk

And then:

$ wrk
Usage: wrk <options> <url>                            
  Options:                                            
    -c, --connections <N>  Connections to keep open   
    -d, --duration    <T>  Duration of test           
    -t, --threads     <N>  Number of threads to use   

    -s, --script      <S>  Load Lua script file       
    -H, --header      <H>  Add header to request      
        --latency          Print latency statistics   
        --timeout     <T>  Socket/request timeout     
    -v, --version          Print version details      

  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)
insinfo commented 1 year ago

@ksylvan Do you know how to compile for native Windows?

ksylvan commented 11 months ago

@insinfo

Do you know how to compile for native Windows?

No, I don't. I haven't done it myself.

But it's mostly C and Lua, and given a sufficiently POSIX-like environment, you should be able to do it. You might need to do something like install Cygwin: https://www.cygwin.com/ and then install GCC, etc.

You can install Lua on Windows:

https://www.oreilly.com/library/view/lua-quick-start/9781789343229/b9f5f696-15a5-4445-9eb7-5fea563e9592.xhtml