Skip to content

Instantly share code, notes, and snippets.

@atimin
Created June 27, 2012 21:14
Show Gist options
  • Select an option

  • Save atimin/3006897 to your computer and use it in GitHub Desktop.

Select an option

Save atimin/3006897 to your computer and use it in GitHub Desktop.
RModBus perfomance. $ bundle exec ruby example/perfomance_rtu_via_tcp.rb
Rehearsal ------------------------------------------------------------
Read coils 0.480000 0.080000 0.560000 ( 0.495899)
Read discrete inputs 0.420000 0.140000 0.560000 ( 0.503507)
Read holding registers 1.360000 0.150000 1.510000 ( 1.436041)
Read input registers 1.330000 0.150000 1.480000 ( 1.424927)
Write single coil 0.290000 0.120000 0.410000 ( 0.335850)
Write single register 0.300000 0.090000 0.390000 ( 0.329078)
Write multiple coils 0.510000 0.120000 0.630000 ( 0.564480)
Write multiple registers 1.540000 0.110000 1.650000 ( 1.582799)
--------------------------------------------------- total: 7.190000sec
Rehearsal ------------------------------------------------------------
Read coils 0.340000 0.100000 0.440000 ( 0.398903)
Read discrete inputs 0.400000 0.060000 0.460000 ( 0.406741)
Read holding registers 1.300000 0.100000 1.400000 ( 1.365763)
Read input registers 1.250000 0.160000 1.410000 ( 1.361373)
Write single coil 0.160000 0.130000 0.290000 ( 0.245841)
Write single register 0.190000 0.100000 0.290000 ( 0.240816)
Write multiple coils 0.450000 0.070000 0.520000 ( 0.462328)
Write multiple registers 1.400000 0.130000 1.530000 ( 1.496654)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment