Printer FriendlyEmail Article Link

How to get the report results in per interval via LS-HLAPI on Landslide?

Answer

 

For the Landslide native API, we need to add the additional ‘-lastInterval’ in the ls::query measurements, please refer the Landslide online help as below: 

 

The query measurements function provides visibility of the current interval and the last saved interval of reported measurements. To view a whole tab of measurements, you provide just the tab and not the name argument. To view a single measurement, you include the name. The lastInterval argument will return the value(s) for the last recorded interval, as opposed to the default current interval, which may or may not be populated yet. For viewing per-interval values, the lastInterval argument is recommended, since the current interval may not be populated enough yet to provide an accurate per-interval value.

 

The example of script:

 

while {$loop <10} {

    incr loop;

 

    set r [ls::query measurements $::lsh::TEST_HANDLES($test) -tab "L3 Client" -name "Total Packets Sent" -perInterval -lastInterval]

    puts "INTERVAL$loop interval: $r"

    set r [::lsh::get_results -test_hnd $test -tab "L3 Client" -name "Total Packets Sent"]

    #puts "$r"

    set r [lindex [lindex [lindex [lindex $r 0] 1] 0] 1]

    puts "INTERVAL$loop cumulative: $r   interval_count:[expr $r - $previous]"

    set previous $r

    sleep 15;

}

 

 

Landslide native API can support the query result per interval, but it’s not included in the lshapi.


Product : Landslide,Tcl API