1168404Spjd/* 2168404Spjd * CDDL HEADER START 3168404Spjd * 4168404Spjd * The contents of this file are subject to the terms of the 5168404Spjd * Common Development and Distribution License (the "License"). 6168404Spjd * You may not use this file except in compliance with the License. 7168404Spjd * 8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9168404Spjd * or http://www.opensolaris.org/os/licensing. 10168404Spjd * See the License for the specific language governing permissions 11168404Spjd * and limitations under the License. 12168404Spjd * 13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each 14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15168404Spjd * If applicable, add the following below this CDDL HEADER, with the 16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying 17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner] 18168404Spjd * 19168404Spjd * CDDL HEADER END 20168404Spjd */ 21168404Spjd 22168404Spjd/* 23219089Spjd * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24228103Smm * Use is subject to license terms. 25249195Smm */ 26247348Smm 27168404Spjd/* 28168404Spjd * ASSERTION: 29168404Spjd * Test the basic formatting of all the supported kinds of aggregations. 30168404Spjd * 31168404Spjd * SECTION: Output Formatting/printa() 32168404Spjd * 33168404Spjd */ 34168404Spjd 35168404Spjd#pragma D option quiet 36168404Spjd 37168404SpjdBEGIN 38168404Spjd{ 39168404Spjd @a = avg(1); 40168404Spjd @b = count(); 41168404Spjd @c = lquantize(1, 1, 10); 42168404Spjd @d = max(1); 43185029Spjd @e = min(1); 44213197Smm @f = sum(1); 45219089Spjd @g = quantize(1); 46240868Spjd @h = stddev(1); 47168404Spjd 48168404Spjd printa("@a = %@u\n", @a); 49168404Spjd printa("@b = %@u\n", @b); 50168404Spjd printa("@c = %@d\n", @c); 51168404Spjd printa("@d = %@u\n", @d); 52168404Spjd printa("@e = %@u\n", @e); 53168404Spjd printa("@f = %@u\n", @f); 54168404Spjd printa("@g = %@d\n", @g); 55254591Sgibbs printa("@h = %@d\n", @h); 56254591Sgibbs 57254591Sgibbs exit(0); 58254591Sgibbs} 59254591Sgibbs