12633Sahl /* 22633Sahl * CDDL HEADER START 32633Sahl * 42633Sahl * The contents of this file are subject to the terms of the 52633Sahl * Common Development and Distribution License (the "License"). 62633Sahl * You may not use this file except in compliance with the License. 72633Sahl * 82633Sahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 92633Sahl * or http://www.opensolaris.org/os/licensing. 102633Sahl * See the License for the specific language governing permissions 112633Sahl * and limitations under the License. 122633Sahl * 132633Sahl * When distributing Covered Code, include this CDDL HEADER in each 142633Sahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 152633Sahl * If applicable, add the following below this CDDL HEADER, with the 162633Sahl * fields enclosed by brackets "[]" replaced with your own identifying 172633Sahl * information: Portions Copyright [yyyy] [name of copyright owner] 182633Sahl * 192633Sahl * CDDL HEADER END 202633Sahl */ 212633Sahl 222633Sahl /* 23*9531Srafael.vanoni@sun.com * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 242633Sahl * Use is subject to license terms. 252633Sahl */ 262633Sahl 272633Sahl /* 282633Sahl * ASSERTION: 29*9531Srafael.vanoni@sun.com * Test multiple aggregations and overriding default order with 30*9531Srafael.vanoni@sun.com * printa() statements. 312633Sahl * 322633Sahl * SECTION: Aggregations/Aggregations; 33*9531Srafael.vanoni@sun.com * Aggregations/Output 342633Sahl * 352633Sahl * NOTES: This is a simple verifiable test. 362633Sahl * 372633Sahl */ 382633Sahl 392633Sahl #pragma D option quiet 402633Sahl 412633Sahl BEGIN 422633Sahl { 432633Sahl i = 0; 442633Sahl } 452633Sahl 462633Sahl tick-10ms 472633Sahl /i < 1000/ 482633Sahl { 492633Sahl @a = count(); 502633Sahl @b = avg(i); 512633Sahl @c = sum(i); 522633Sahl @d = min(i); 532633Sahl @e = max(i); 542633Sahl @f = quantize(i); 552633Sahl @g = lquantize(i, 0, 1000, 100); 56*9531Srafael.vanoni@sun.com @h = stddev(i); 572633Sahl 582633Sahl i += 100; 592633Sahl } 602633Sahl 612633Sahl tick-10ms 622633Sahl /i == 1000/ 632633Sahl { 64*9531Srafael.vanoni@sun.com printa("%@d\n", @h); 652633Sahl printa("%@d\n", @g); 662633Sahl printa("%@d\n", @f); 672633Sahl printa("%@d\n", @e); 682633Sahl printa("%@d\n", @d); 692633Sahl printa("%@d\n", @c); 702633Sahl printa("%@d\n", @b); 712633Sahl printa("%@d\n", @a); 722633Sahl 732633Sahl exit(0); 742633Sahl } 75