Skip to content
Snippets Groups Projects
Select Git revision
  • master default
  • windows_ci_static
  • c_link
  • cpack
  • windows_ci
  • cert_pk_id
  • proxy_push_result
  • cnode_put_id
  • update-windows-build
  • proxy
  • resubscribe_on_token_change
  • actions
  • client_mode
  • llhttp
  • search_node_add
  • crypto_aes_gcm_argon2
  • ios_notifications
  • log_fmt
  • v2asio
  • fix-msvc
  • v3.4.0
  • v3.3.1
  • v3.3.1rc1
  • v3.3.1rc2
  • v3.3.0
  • v3.2.0
  • v3.1.11
  • v3.1.10
  • v3.1.9
  • v3.1.8.2
  • v3.1.8.1
  • v3.1.8
  • v3.1.7
  • v3.1.6
  • v3.1.5
  • v3.1.4
  • v3.1.3
  • v3.1.2
  • v3.1
  • v3.0.1
40 results

tools

  • Clone with SSH
  • Clone with HTTPS
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.

    Benchmark

    The benchmark.py script is used for testing OpenDHT in various cases. If you run benchmark.py --help, you should find the following text:

    optional arguments:
      -h, --help            show this help message and exit
      --performance         Launches performance benchmark test. Available args
                            for "-t" are: gets.
      --data-persistence    Launches data persistence benchmark test. Available
                            args for "-t" are: delete, replace, mult_time.
                            Available args for "-o" are : dump_str_log,
                            keep_alive, trigger, traffic_plot, op_plot. Use "-m"
                            to specify the number of producers on the DHT.Use "-e"
                            to specify the number of values to put on the DHT.

    These options specify the feature to be tested. Each feature has its own tests. You specify the test by using -t flag (see benchmark.py --help for full help).

    Python dependencies

    • pyroute2 >=0.3.14
    • matplotlib
    • GeoIP (used by scanner.py for drawing map of the world)
    • ipaddress
    • netifaces
    • networkx
    • numpy

    Usage

    Before running the script, you have to build and install OpenDHT and its cython wrapper (cython3 has to be installed) on the system so that it can be found by the benchmark script.

    $ cd $OPENDHT_SRC_DIR
    $ ./autogen.sh
    $ ./configure
    $ make && sudo make install

    Then, you can use the script like so:

    $ cd $OPENDHT_SRC_DIR/python/tools/
    $ python3 benchmark.py --performance -t gets -n 2048