tst.multinormalize.d revision 296373
172172Sphantom/* 272172Sphantom * CDDL HEADER START 388473Sphantom * 4118459Smtm * The contents of this file are subject to the terms of the 5123682Sache * Common Development and Distribution License (the "License"). 686073Sache * You may not use this file except in compliance with the License. 7108428Sache * 877984Sache * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 977984Sache * or http://www.opensolaris.org/os/licensing. 10193867Sedwin * See the License for the specific language governing permissions 1177984Sache * and limitations under the License. 1277984Sache * 1377984Sache * When distributing Covered Code, include this CDDL HEADER in each 1477984Sache * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1577984Sache * If applicable, add the following below this CDDL HEADER, with the 16134437Stjr * fields enclosed by brackets "[]" replaced with your own identifying 1777984Sache * information: Portions Copyright [yyyy] [name of copyright owner] 1890583Sphantom * 1977984Sache * CDDL HEADER END 2087043Sache */ 2177984Sache 2277984Sache/* 23117259Sache * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2477984Sache * Use is subject to license terms. 2577984Sache */ 2688473Sphantom 27125208Sache#pragma ident "%Z%%M% %I% %E% SMI" 2888473Sphantom 29105965Sache/* 30162940Sache * ASSERTION: 3177984Sache * Multiple aggregations are supported 3277984Sache * 3377984Sache * SECTION: Aggregations/Normalization 3493885Sphantom * 3577984Sache */ 3689077Sache 3772208Sasmodai#pragma D option quiet 3877984Sache#pragma D option aggrate=1ms 3977984Sache#pragma D option switchrate=50ms 40105445Sache 41105445SacheBEGIN 4277984Sache{ 4377984Sache i = 0; 4472565Sache start = timestamp; 45118174Sache} 4672172Sphantom 47136659Srutick-100ms 4876105Sphantom/i < 20/ 4972172Sphantom{ 5072172Sphantom @func1[i % 5] = sum(i * 100); 5172172Sphantom @func2[i % 5 + 1] = sum(i * 200); 5272172Sphantom i++; 5372172Sphantom} 54136659Sru 55136659Srutick-100ms 5672172Sphantom/i == 20/ 57136659Sru{ 58136659Sru printf("normalized data #1:\n"); 5972258Swollman normalize(@func1, 5); 60136659Sru printa(@func1); 61136659Sru 62136659Sru printf("\nnormalized data #2:\n"); 63136659Sru normalize(@func2, 5); 64136659Sru exit(0); 65136659Sru} 66136659Sru