pac-bench

Benchmark the PAC (Proxy Auto-config File).

Usage no npm install needed!

<script type="module">
  import pacBench from 'https://cdn.skypack.dev/pac-bench';
</script>

README

pac-bench

Install pac-bench: (sudo) npm install -g pac-bench

You can do something like this:

Input:

echo 'function FindProxyForURL(url, host) { return "PROXY proxy.example.com:8080; DIRECT"; }' | pac-bench

or

pac-bench -f ./some_pac_file.pac

Output:

total:  421.886029 ms
avg:  61.769550366032206 ns
times:  10

Input:

pac-bench --help

Output:

  Usage: pac-bench [options]

  Options:

    -h, --help         output usage information
    -V, --version      output the version number
    -t, --times <n>    Repeat Times
    -f, --file <path>  Specify the PAC File
    -v, --verbose      Debug Mode