err.D_NORMALIZE_AGGARG.bad.d revision 14ea49401f3c8c61422aefbda43809e275f60c6c
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/*
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * CDDL HEADER START
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The contents of this file are subject to the terms of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Common Development and Distribution License (the "License").
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * You may not use this file except in compliance with the License.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * or http://www.opensolaris.org/os/licensing.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * See the License for the specific language governing permissions
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * and limitations under the License.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * When distributing Covered Code, include this CDDL HEADER in each
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * If applicable, add the following below this CDDL HEADER, with the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * fields enclosed by brackets "[]" replaced with your own identifying
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * information: Portions Copyright [yyyy] [name of copyright owner]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * CDDL HEADER END
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/*
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Use is subject to license terms.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#pragma ident "%Z%%M% %I% %E% SMI"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/*
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * ASSERTION:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The first argument to normalize() should be an aggregation.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * SECTION: Aggregations/Clearing aggregations
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#pragma D option quiet
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#pragma D option aggrate=1ms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#pragma D option switchrate=1ms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncBEGIN
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync{
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync i = 0;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync start = timestamp;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync}
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynctick-100ms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/i < 20/
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync{
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync @func[i % 5] = sum(i * 100);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync i++;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync}
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynctick-100ms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/i == 20/
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync{
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync printf("normalized data:\n");
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync normalize(count(), 4);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync exit(0);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync}
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync