stattest.cc (7830:8bdcec97b36b) | stattest.cc (7831:c1e158414648) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 120 unchanged lines hidden (view full) --- 129 Scalar s11; 130 Distribution s12; 131 VectorDistribution s13; 132 VectorStandardDeviation s14; 133 VectorAverageDeviation s15; 134 Vector2d s16; 135 Value s17; 136 Value s18; | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 120 unchanged lines hidden (view full) --- 129 Scalar s11; 130 Distribution s12; 131 VectorDistribution s13; 132 VectorStandardDeviation s14; 133 VectorAverageDeviation s15; 134 Vector2d s16; 135 Value s17; 136 Value s18; |
137 Histogram h01; 138 Histogram h02; 139 Histogram h03; 140 Histogram h04; 141 Histogram h05; 142 Histogram h06; 143 Histogram h07; 144 Histogram h08; 145 Histogram h09; 146 Histogram h10; 147 Histogram h11; 148 Histogram h12; |
|
137 138 Formula f1; 139 Formula f2; 140 Formula f3; 141 Formula f4; 142 Formula f5; 143 144 cprintf("sizeof(Scalar) = %d\n", sizeof(Scalar)); --- 116 unchanged lines hidden (view full) --- 261 262 TestClass testclass; 263 s18 264 .functor(testclass) 265 .name("Stat18") 266 .desc("this is stat 18") 267 ; 268 | 149 150 Formula f1; 151 Formula f2; 152 Formula f3; 153 Formula f4; 154 Formula f5; 155 156 cprintf("sizeof(Scalar) = %d\n", sizeof(Scalar)); --- 116 unchanged lines hidden (view full) --- 273 274 TestClass testclass; 275 s18 276 .functor(testclass) 277 .name("Stat18") 278 .desc("this is stat 18") 279 ; 280 |
281 h01 282 .init(11) 283 .name("Histogram01") 284 .desc("this is histogram 1") 285 ; |
|
269 | 286 |
287 h02 288 .init(10) 289 .name("Histogram02") 290 .desc("this is histogram 2") 291 ; 292 293 h03 294 .init(11) 295 .name("Histogram03") 296 .desc("this is histogram 3") 297 ; 298 299 h04 300 .init(10) 301 .name("Histogram04") 302 .desc("this is histogram 4") 303 ; 304 305 h05 306 .init(11) 307 .name("Histogram05") 308 .desc("this is histogram 5") 309 ; 310 311 h06 312 .init(10) 313 .name("Histogram06") 314 .desc("this is histogram 6") 315 ; 316 317 h07 318 .init(11) 319 .name("Histogram07") 320 .desc("this is histogram 7") 321 ; 322 323 h08 324 .init(10) 325 .name("Histogram08") 326 .desc("this is histogram 8") 327 ; 328 329 h09 330 .init(11) 331 .name("Histogram09") 332 .desc("this is histogram 9") 333 ; 334 335 h10 336 .init(10) 337 .name("Histogram10") 338 .desc("this is histogram 10") 339 ; 340 341 h11 342 .init(11) 343 .name("Histogram11") 344 .desc("this is histogram 11") 345 ; 346 347 h12 348 .init(10) 349 .name("Histogram12") 350 .desc("this is histogram 12") 351 ; 352 |
|
270 f1 271 .name("Formula1") 272 .desc("this is formula 1") 273 .prereq(s11) 274 ; 275 276 f2 277 .name("Formula2") --- 261 unchanged lines hidden (view full) --- 539 s4 = curTick(); 540 s6.sample(100); 541 s6.sample(100); 542 s6.sample(100); 543 s6.sample(101); 544 s6.sample(102); 545 546 s12.sample(100); | 353 f1 354 .name("Formula1") 355 .desc("this is formula 1") 356 .prereq(s11) 357 ; 358 359 f2 360 .name("Formula2") --- 261 unchanged lines hidden (view full) --- 622 s4 = curTick(); 623 s6.sample(100); 624 s6.sample(100); 625 s6.sample(100); 626 s6.sample(101); 627 s6.sample(102); 628 629 s12.sample(100); |
630 for (int i = 0; i < 100; i++) { 631 h01.sample(i); 632 h02.sample(i); 633 } |
|
547 | 634 |
635 for (int i = -100; i < 100; i++) { 636 h03.sample(i); 637 h04.sample(i); 638 } 639 640 for (int i = -100; i < 1000; i++) { 641 h05.sample(i); 642 h06.sample(i); 643 } 644 645 for (int i = 100; i >= -1000; i--) { 646 h07.sample(i); 647 h08.sample(i); 648 } 649 650 for (int i = 0; i <= 1023; i++) { 651 h09.sample(i); 652 h10.sample(i); 653 } 654 655 for (int i = -1024; i <= 1023; i++) { 656 h11.sample(i); 657 h12.sample(i); 658 } 659 |
|
548 prepare(); 549 550 if (text) { 551 Text out(cout); 552 out.descriptions = descriptions; 553 out(); 554 } 555 556#if USE_MYSQL 557 if (!mysql_name.empty()) { 558 MySql out; 559 out.connect(mysql_host, mysql_db, mysql_user, mysql_passwd, "test", 560 mysql_name, "test"); 561 out(); 562 } 563#endif 564 565 return 0; 566} | 660 prepare(); 661 662 if (text) { 663 Text out(cout); 664 out.descriptions = descriptions; 665 out(); 666 } 667 668#if USE_MYSQL 669 if (!mysql_name.empty()) { 670 MySql out; 671 out.connect(mysql_host, mysql_db, mysql_user, mysql_passwd, "test", 672 mysql_name, "test"); 673 out(); 674 } 675#endif 676 677 return 0; 678} |