File: api_histogram.t

package info (click to toggle)
sysbench 1.0.20%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,828 kB
  • sloc: ansic: 11,830; sh: 1,752; xml: 736; makefile: 192
file content (21 lines) | stat: -rw-r--r-- 697 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
########################################################################
Tests for histogram API
########################################################################

  $ sysbench <<EOF
  >   h = sysbench.histogram.new(1000, 1, 10)
  >   h:update(1)
  >   h:update(2)
  >   h:update(0)
  >   h:update(10)
  >   h:update(100)
  >   h:update(5.001)
  >   h:print()
  > EOF
  sysbench * (glob)
  
         value  ------------- distribution ------------- count
         1.000 |**************************************** 2
         2.001 |********************                     1
         4.997 |********************                     1
        10.000 |**************************************** 2