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; 9 * redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution; 12 * neither the name of the copyright holders nor the names of its 13 * contributors may be used to endorse or promote products derived from 14 * this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| 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; 9 * redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution; 12 * neither the name of the copyright holders nor the names of its 13 * contributors may be used to endorse or promote products derived from 14 * this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27 */ 28 29#include <iomanip> 30#include <iostream> 31#include <fstream> 32#include <string> 33#include <unistd.h> 34 35#include "base/cprintf.hh" 36#include "base/misc.hh" 37#include "base/statistics.hh" 38#include "base/stats/text.hh" 39#include "base/stats/mysql.hh" 40#include "sim/host.hh" 41 42using namespace std; 43using namespace Stats; 44 45Tick curTick = 0; 46Tick ticksPerSecond = ULL(2000000000); 47 48Scalar<> s1; 49Scalar<> s2; 50Average<> s3; 51Scalar<MainBin> s4; 52Vector<MainBin> s5; 53Distribution<MainBin> s6; 54Vector<MainBin> s7; 55AverageVector<> s8; 56StandardDeviation<> s9; 57AverageDeviation<> s10; 58Scalar<> s11; 59Distribution<> s12; 60VectorDistribution<> s13; 61VectorStandardDeviation<> s14; 62VectorAverageDeviation<> s15; 63Vector2d<> s16; 64 65Formula f1; 66Formula f2; 67Formula f3; 68Value f4; 69Value f5; 70Formula f6; 71Formula f7; 72 73MainBin bin1("bin1"); 74MainBin bin2("bin2"); 75 76ostream *outputStream = &cout; 77 78double 79testfunc() 80{ 81 return 9.8; 82} 83 84class TestClass { 85 public: 86 double operator()() { return 9.7; } 87}; 88 89char *progname = ""; 90 91void 92usage() 93{ 94 panic("incorrect usage.\n" 95 "usage:\n" 96 "\t%s [-t [-c] [-d]]\n", progname); 97} 98 99int 100main(int argc, char *argv[]) 101{ 102 bool descriptions = false; 103 bool compat = false; 104 bool text = false; 105 string mysql_name; 106 string mysql_host; 107 string mysql_user = "binkertn"; 108 string mysql_passwd; 109 110 char c; 111 progname = argv[0]; 112 while ((c = getopt(argc, argv, "cdh:P:p:s:tu:")) != -1) { 113 switch (c) { 114 case 'c': 115 compat = true; 116 break; 117 case 'd': 118 descriptions = true; 119 break; 120 case 'h': 121 mysql_host = optarg; 122 break; 123 case 'P': 124 mysql_passwd = optarg; 125 break; 126 case 's': 127 mysql_name = optarg; 128 break; 129 case 't': 130 text = true; 131 break; 132 case 'u': 133 mysql_user = optarg; 134 break; 135 default: 136 usage(); 137 } 138 } 139 140 if (!text && (compat || descriptions)) 141 usage(); 142 143 s5.init(5); 144 s6.init(1, 100, 13); 145 s7.init(7); 146 s8.init(10); 147 s12.init(1, 100, 13); 148 s13.init(4, 0, 99, 10); 149 s14.init(9); 150 s15.init(10); 151 s16.init(2, 9); 152 153 s1 154 .name("Stat01") 155 .desc("this is statistic 1") 156 ; 157 158 s2 159 .name("Stat02") 160 .desc("this is statistic 2") 161 .prereq(s11) 162 ; 163 164 s3 165 .name("Stat03") 166 .desc("this is statistic 3") 167 .prereq(f7) 168 ; 169 170 s4 171 .name("Stat04") 172 .desc("this is statistic 4") 173 .prereq(s11) 174 ; 175 176 s5 177 .name("Stat05") 178 .desc("this is statistic 5") 179 .prereq(s11) 180 .subname(0, "foo1") 181 .subname(1, "foo2") 182 .subname(2, "foo3") 183 .subname(3, "foo4") 184 .subname(4, "foo5") 185 ; 186 187 s6 188 .name("Stat06") 189 .desc("this is statistic 6") 190 .prereq(s11) 191 ; 192 193 s7 194 .name("Stat07") 195 .desc("this is statistic 7") 196 .precision(1) 197 .flags(pdf | total) 198 .prereq(s11) 199 ; 200 201 s8 202 .name("Stat08") 203 .desc("this is statistic 8") 204 .precision(2) 205 .prereq(s11) 206 .subname(4, "blarg") 207 ; 208 209 s9 210 .name("Stat09") 211 .desc("this is statistic 9") 212 .precision(4) 213 .prereq(s11) 214 ; 215 216 s10 217 .name("Stat10") 218 .desc("this is statistic 10") 219 .prereq(s11) 220 ; 221 222 s12 223 .name("Stat12") 224 .desc("this is statistic 12") 225 ; 226 227 s13 228 .name("Stat13") 229 .desc("this is statistic 13") 230 ; 231 232 s14 233 .name("Stat14") 234 .desc("this is statistic 14") 235 ; 236 237 s15 238 .name("Stat15") 239 .desc("this is statistic 15") 240 ; 241 242 s16 243 .name("Stat16") 244 .desc("this is statistic 16") 245 .flags(total) 246 .subname(0, "sub0") 247 .subname(1, "sub1") 248 .ysubname(0, "y0") 249 .ysubname(1, "y1") 250 ; 251 252 f1 253 .name("Formula1") 254 .desc("this is formula 1") 255 .prereq(s11) 256 ; 257 258 f2 259 .name("Formula2") 260 .desc("this is formula 2") 261 .prereq(s11) 262 .precision(1) 263 ; 264 265 f3 266 .name("Formula3") 267 .desc("this is formula 3") 268 .prereq(s11) 269 .subname(0, "bar1") 270 .subname(1, "bar2") 271 .subname(2, "bar3") 272 .subname(3, "bar4") 273 .subname(4, "bar5") 274 ; 275 276 f4 277 .functor(testfunc) 278 .name("Formula4") 279 .desc("this is formula 4") 280 ; 281 282 TestClass testclass; 283 f5 284 .functor(testclass) 285 .name("Formula5") 286 .desc("this is formula 5") 287 ; 288 289 f6 290 .name("Formula6") 291 .desc("this is formula 6") 292 ; 293 294 f1 = s1 + s2; 295 f2 = (-s1) / (-s2) * (-s3 + ULL(100) + s4); 296 f3 = sum(s5) * s7; 297 f6 += constant(10.0); 298 f6 += s5[3]; 299 f7 = constant(1); 300 301 check(); 302 reset(); 303 304 bin1.activate(); 305 306 s16[1][0] = 1; 307 s16[0][1] = 3; 308 s16[0][0] = 2; 309 s16[1][1] = 9; 310 s16[1][1] += 9; 311 s16[1][8] += 8; 312 s16[1][7] += 7; 313 s16[1][6] += 6; 314 s16[1][5] += 5; 315 s16[1][4] += 4; 316 317 s11 = 1; 318 s3 = 9; 319 s8[3] = 9; 320 s15[0].sample(1234); 321 s15[1].sample(1234); 322 s15[2].sample(1234); 323 s15[3].sample(1234); 324 s15[4].sample(1234); 325 s15[5].sample(1234); 326 s15[6].sample(1234); 327 s15[7].sample(1234); 328 s15[8].sample(1234); 329 s15[9].sample(1234); 330 331 s10.sample(1000000000); 332 curTick += ULL(1000000); 333 s10.sample(100000); 334 s10.sample(100000); 335 s10.sample(100000); 336 s10.sample(100000); 337 s10.sample(100000); 338 s10.sample(100000); 339 s10.sample(100000); 340 s10.sample(100000); 341 s10.sample(100000); 342 s10.sample(100000); 343 s10.sample(100000); 344 s10.sample(100000); 345 s10.sample(100000); 346 s13[0].sample(12); 347 s13[1].sample(29); 348 s13[2].sample(12); 349 s13[3].sample(29); 350 s13[0].sample(42); 351 s13[1].sample(29); 352 s13[2].sample(42); 353 s13[3].sample(32); 354 s13[0].sample(52); 355 s13[1].sample(49); 356 s13[2].sample(42); 357 s13[3].sample(25); 358 s13[0].sample(32); 359 s13[1].sample(49); 360 s13[2].sample(22); 361 s13[3].sample(49); 362 s13[0].sample(62); 363 s13[1].sample(99); 364 s13[2].sample(72); 365 s13[3].sample(23); 366 s13[0].sample(52); 367 s13[1].sample(78); 368 s13[2].sample(69); 369 s13[3].sample(49); 370 371 s14[0].sample(1234); 372 s14[1].sample(4134); 373 s14[4].sample(1213); 374 s14[3].sample(1124); 375 s14[2].sample(1243); 376 s14[7].sample(1244); 377 s14[4].sample(7234); 378 s14[2].sample(9234); 379 s14[3].sample(1764); 380 s14[7].sample(1564); 381 s14[3].sample(3234); 382 s14[1].sample(2234); 383 s14[5].sample(1234); 384 s14[2].sample(4334); 385 s14[2].sample(1234); 386 s14[4].sample(4334); 387 s14[6].sample(1234); 388 s14[8].sample(8734); 389 s14[1].sample(5234); 390 s14[3].sample(8234); 391 s14[7].sample(5234); 392 s14[4].sample(4434); 393 s14[3].sample(7234); 394 s14[2].sample(1934); 395 s14[1].sample(9234); 396 s14[5].sample(5634); 397 s14[3].sample(1264); 398 s14[7].sample(5223); 399 s14[0].sample(1234); 400 s14[0].sample(5434); 401 s14[3].sample(8634); 402 s14[1].sample(1234); 403 404 405 s15[0].sample(1234); 406 s15[1].sample(4134); 407 curTick += ULL(1000000); 408 s15[4].sample(1213); 409 curTick += ULL(1000000); 410 s15[3].sample(1124); 411 curTick += ULL(1000000); 412 s15[2].sample(1243); 413 curTick += ULL(1000000); 414 s15[7].sample(1244); 415 curTick += ULL(1000000); 416 s15[4].sample(7234); 417 s15[2].sample(9234); 418 s15[3].sample(1764); 419 s15[7].sample(1564); 420 s15[3].sample(3234); 421 s15[1].sample(2234); 422 curTick += ULL(1000000); 423 s15[5].sample(1234); 424 curTick += ULL(1000000); 425 s15[9].sample(4334); 426 curTick += ULL(1000000); 427 s15[2].sample(1234); 428 curTick += ULL(1000000); 429 s15[4].sample(4334); 430 s15[6].sample(1234); 431 curTick += ULL(1000000); 432 s15[8].sample(8734); 433 curTick += ULL(1000000); 434 s15[1].sample(5234); 435 curTick += ULL(1000000); 436 s15[3].sample(8234); 437 curTick += ULL(1000000); 438 s15[7].sample(5234); 439 s15[4].sample(4434); 440 s15[3].sample(7234); 441 s15[2].sample(1934); 442 s15[1].sample(9234); 443 curTick += ULL(1000000); 444 s15[5].sample(5634); 445 s15[3].sample(1264); 446 s15[7].sample(5223); 447 s15[0].sample(1234); 448 s15[0].sample(5434); 449 s15[3].sample(8634); 450 curTick += ULL(1000000); 451 s15[1].sample(1234); 452 453 s4 = curTick; 454 455 s8[3] = 99999; 456 457 s3 = 12; 458 s3++; 459 curTick += 9; 460 461 s1 = 9; 462 s1 += 9; 463 s1 -= 11; 464 s1++; 465 ++s1; 466 s1--; 467 --s1; 468 469 s2 = 9; 470 471 s5[0] += 1; 472 s5[1] += 2; 473 s5[2] += 3; 474 s5[3] += 4; 475 s5[4] += 5; 476 477 s7[0] = 10; 478 s7[1] = 20; 479 s7[2] = 30; 480 s7[3] = 40; 481 s7[4] = 50; 482 s7[5] = 60; 483 s7[6] = 70; 484 485 s6.sample(0); 486 s6.sample(1); 487 s6.sample(2); 488 s6.sample(3); 489 s6.sample(4); 490 s6.sample(5); 491 s6.sample(6); 492 s6.sample(7); 493 s6.sample(8); 494 s6.sample(9); 495 496 bin2.activate(); 497 s6.sample(10); 498 s6.sample(10); 499 s6.sample(10); 500 s6.sample(10); 501 s6.sample(10); 502 s6.sample(10); 503 s6.sample(10); 504 s6.sample(10); 505 s6.sample(11); 506 s6.sample(19); 507 s6.sample(20); 508 s6.sample(20); 509 s6.sample(21); 510 s6.sample(21); 511 s6.sample(31); 512 s6.sample(98); 513 s6.sample(99); 514 s6.sample(99); 515 s6.sample(99); 516 517 s7[0] = 700; 518 s7[1] = 600; 519 s7[2] = 500; 520 s7[3] = 400; 521 s7[4] = 300; 522 s7[5] = 200; 523 s7[6] = 100; 524 525 s9.sample(100); 526 s9.sample(100); 527 s9.sample(100); 528 s9.sample(100); 529 s9.sample(10); 530 s9.sample(10); 531 s9.sample(10); 532 s9.sample(10); 533 s9.sample(10); 534 535 curTick += 9; 536 s4 = curTick; 537 s6.sample(100); 538 s6.sample(100); 539 s6.sample(100); 540 s6.sample(101); 541 s6.sample(102); 542 543 s12.sample(100); 544 545 if (text) { 546 Text out(cout); 547 out.descriptions = descriptions; 548 out.compat = compat; 549 out(); 550 } 551 552 if (!mysql_name.empty()) { 553 MySql out; 554 out.connect(mysql_host, mysql_user, mysql_passwd, "m5stats", 555 mysql_name, "test"); 556 out(); 557 } 558 559 return 0; 560}
| 29 */ 30 31#include <iomanip> 32#include <iostream> 33#include <fstream> 34#include <string> 35#include <unistd.h> 36 37#include "base/cprintf.hh" 38#include "base/misc.hh" 39#include "base/statistics.hh" 40#include "base/stats/text.hh" 41#include "base/stats/mysql.hh" 42#include "sim/host.hh" 43 44using namespace std; 45using namespace Stats; 46 47Tick curTick = 0; 48Tick ticksPerSecond = ULL(2000000000); 49 50Scalar<> s1; 51Scalar<> s2; 52Average<> s3; 53Scalar<MainBin> s4; 54Vector<MainBin> s5; 55Distribution<MainBin> s6; 56Vector<MainBin> s7; 57AverageVector<> s8; 58StandardDeviation<> s9; 59AverageDeviation<> s10; 60Scalar<> s11; 61Distribution<> s12; 62VectorDistribution<> s13; 63VectorStandardDeviation<> s14; 64VectorAverageDeviation<> s15; 65Vector2d<> s16; 66 67Formula f1; 68Formula f2; 69Formula f3; 70Value f4; 71Value f5; 72Formula f6; 73Formula f7; 74 75MainBin bin1("bin1"); 76MainBin bin2("bin2"); 77 78ostream *outputStream = &cout; 79 80double 81testfunc() 82{ 83 return 9.8; 84} 85 86class TestClass { 87 public: 88 double operator()() { return 9.7; } 89}; 90 91char *progname = ""; 92 93void 94usage() 95{ 96 panic("incorrect usage.\n" 97 "usage:\n" 98 "\t%s [-t [-c] [-d]]\n", progname); 99} 100 101int 102main(int argc, char *argv[]) 103{ 104 bool descriptions = false; 105 bool compat = false; 106 bool text = false; 107 string mysql_name; 108 string mysql_host; 109 string mysql_user = "binkertn"; 110 string mysql_passwd; 111 112 char c; 113 progname = argv[0]; 114 while ((c = getopt(argc, argv, "cdh:P:p:s:tu:")) != -1) { 115 switch (c) { 116 case 'c': 117 compat = true; 118 break; 119 case 'd': 120 descriptions = true; 121 break; 122 case 'h': 123 mysql_host = optarg; 124 break; 125 case 'P': 126 mysql_passwd = optarg; 127 break; 128 case 's': 129 mysql_name = optarg; 130 break; 131 case 't': 132 text = true; 133 break; 134 case 'u': 135 mysql_user = optarg; 136 break; 137 default: 138 usage(); 139 } 140 } 141 142 if (!text && (compat || descriptions)) 143 usage(); 144 145 s5.init(5); 146 s6.init(1, 100, 13); 147 s7.init(7); 148 s8.init(10); 149 s12.init(1, 100, 13); 150 s13.init(4, 0, 99, 10); 151 s14.init(9); 152 s15.init(10); 153 s16.init(2, 9); 154 155 s1 156 .name("Stat01") 157 .desc("this is statistic 1") 158 ; 159 160 s2 161 .name("Stat02") 162 .desc("this is statistic 2") 163 .prereq(s11) 164 ; 165 166 s3 167 .name("Stat03") 168 .desc("this is statistic 3") 169 .prereq(f7) 170 ; 171 172 s4 173 .name("Stat04") 174 .desc("this is statistic 4") 175 .prereq(s11) 176 ; 177 178 s5 179 .name("Stat05") 180 .desc("this is statistic 5") 181 .prereq(s11) 182 .subname(0, "foo1") 183 .subname(1, "foo2") 184 .subname(2, "foo3") 185 .subname(3, "foo4") 186 .subname(4, "foo5") 187 ; 188 189 s6 190 .name("Stat06") 191 .desc("this is statistic 6") 192 .prereq(s11) 193 ; 194 195 s7 196 .name("Stat07") 197 .desc("this is statistic 7") 198 .precision(1) 199 .flags(pdf | total) 200 .prereq(s11) 201 ; 202 203 s8 204 .name("Stat08") 205 .desc("this is statistic 8") 206 .precision(2) 207 .prereq(s11) 208 .subname(4, "blarg") 209 ; 210 211 s9 212 .name("Stat09") 213 .desc("this is statistic 9") 214 .precision(4) 215 .prereq(s11) 216 ; 217 218 s10 219 .name("Stat10") 220 .desc("this is statistic 10") 221 .prereq(s11) 222 ; 223 224 s12 225 .name("Stat12") 226 .desc("this is statistic 12") 227 ; 228 229 s13 230 .name("Stat13") 231 .desc("this is statistic 13") 232 ; 233 234 s14 235 .name("Stat14") 236 .desc("this is statistic 14") 237 ; 238 239 s15 240 .name("Stat15") 241 .desc("this is statistic 15") 242 ; 243 244 s16 245 .name("Stat16") 246 .desc("this is statistic 16") 247 .flags(total) 248 .subname(0, "sub0") 249 .subname(1, "sub1") 250 .ysubname(0, "y0") 251 .ysubname(1, "y1") 252 ; 253 254 f1 255 .name("Formula1") 256 .desc("this is formula 1") 257 .prereq(s11) 258 ; 259 260 f2 261 .name("Formula2") 262 .desc("this is formula 2") 263 .prereq(s11) 264 .precision(1) 265 ; 266 267 f3 268 .name("Formula3") 269 .desc("this is formula 3") 270 .prereq(s11) 271 .subname(0, "bar1") 272 .subname(1, "bar2") 273 .subname(2, "bar3") 274 .subname(3, "bar4") 275 .subname(4, "bar5") 276 ; 277 278 f4 279 .functor(testfunc) 280 .name("Formula4") 281 .desc("this is formula 4") 282 ; 283 284 TestClass testclass; 285 f5 286 .functor(testclass) 287 .name("Formula5") 288 .desc("this is formula 5") 289 ; 290 291 f6 292 .name("Formula6") 293 .desc("this is formula 6") 294 ; 295 296 f1 = s1 + s2; 297 f2 = (-s1) / (-s2) * (-s3 + ULL(100) + s4); 298 f3 = sum(s5) * s7; 299 f6 += constant(10.0); 300 f6 += s5[3]; 301 f7 = constant(1); 302 303 check(); 304 reset(); 305 306 bin1.activate(); 307 308 s16[1][0] = 1; 309 s16[0][1] = 3; 310 s16[0][0] = 2; 311 s16[1][1] = 9; 312 s16[1][1] += 9; 313 s16[1][8] += 8; 314 s16[1][7] += 7; 315 s16[1][6] += 6; 316 s16[1][5] += 5; 317 s16[1][4] += 4; 318 319 s11 = 1; 320 s3 = 9; 321 s8[3] = 9; 322 s15[0].sample(1234); 323 s15[1].sample(1234); 324 s15[2].sample(1234); 325 s15[3].sample(1234); 326 s15[4].sample(1234); 327 s15[5].sample(1234); 328 s15[6].sample(1234); 329 s15[7].sample(1234); 330 s15[8].sample(1234); 331 s15[9].sample(1234); 332 333 s10.sample(1000000000); 334 curTick += ULL(1000000); 335 s10.sample(100000); 336 s10.sample(100000); 337 s10.sample(100000); 338 s10.sample(100000); 339 s10.sample(100000); 340 s10.sample(100000); 341 s10.sample(100000); 342 s10.sample(100000); 343 s10.sample(100000); 344 s10.sample(100000); 345 s10.sample(100000); 346 s10.sample(100000); 347 s10.sample(100000); 348 s13[0].sample(12); 349 s13[1].sample(29); 350 s13[2].sample(12); 351 s13[3].sample(29); 352 s13[0].sample(42); 353 s13[1].sample(29); 354 s13[2].sample(42); 355 s13[3].sample(32); 356 s13[0].sample(52); 357 s13[1].sample(49); 358 s13[2].sample(42); 359 s13[3].sample(25); 360 s13[0].sample(32); 361 s13[1].sample(49); 362 s13[2].sample(22); 363 s13[3].sample(49); 364 s13[0].sample(62); 365 s13[1].sample(99); 366 s13[2].sample(72); 367 s13[3].sample(23); 368 s13[0].sample(52); 369 s13[1].sample(78); 370 s13[2].sample(69); 371 s13[3].sample(49); 372 373 s14[0].sample(1234); 374 s14[1].sample(4134); 375 s14[4].sample(1213); 376 s14[3].sample(1124); 377 s14[2].sample(1243); 378 s14[7].sample(1244); 379 s14[4].sample(7234); 380 s14[2].sample(9234); 381 s14[3].sample(1764); 382 s14[7].sample(1564); 383 s14[3].sample(3234); 384 s14[1].sample(2234); 385 s14[5].sample(1234); 386 s14[2].sample(4334); 387 s14[2].sample(1234); 388 s14[4].sample(4334); 389 s14[6].sample(1234); 390 s14[8].sample(8734); 391 s14[1].sample(5234); 392 s14[3].sample(8234); 393 s14[7].sample(5234); 394 s14[4].sample(4434); 395 s14[3].sample(7234); 396 s14[2].sample(1934); 397 s14[1].sample(9234); 398 s14[5].sample(5634); 399 s14[3].sample(1264); 400 s14[7].sample(5223); 401 s14[0].sample(1234); 402 s14[0].sample(5434); 403 s14[3].sample(8634); 404 s14[1].sample(1234); 405 406 407 s15[0].sample(1234); 408 s15[1].sample(4134); 409 curTick += ULL(1000000); 410 s15[4].sample(1213); 411 curTick += ULL(1000000); 412 s15[3].sample(1124); 413 curTick += ULL(1000000); 414 s15[2].sample(1243); 415 curTick += ULL(1000000); 416 s15[7].sample(1244); 417 curTick += ULL(1000000); 418 s15[4].sample(7234); 419 s15[2].sample(9234); 420 s15[3].sample(1764); 421 s15[7].sample(1564); 422 s15[3].sample(3234); 423 s15[1].sample(2234); 424 curTick += ULL(1000000); 425 s15[5].sample(1234); 426 curTick += ULL(1000000); 427 s15[9].sample(4334); 428 curTick += ULL(1000000); 429 s15[2].sample(1234); 430 curTick += ULL(1000000); 431 s15[4].sample(4334); 432 s15[6].sample(1234); 433 curTick += ULL(1000000); 434 s15[8].sample(8734); 435 curTick += ULL(1000000); 436 s15[1].sample(5234); 437 curTick += ULL(1000000); 438 s15[3].sample(8234); 439 curTick += ULL(1000000); 440 s15[7].sample(5234); 441 s15[4].sample(4434); 442 s15[3].sample(7234); 443 s15[2].sample(1934); 444 s15[1].sample(9234); 445 curTick += ULL(1000000); 446 s15[5].sample(5634); 447 s15[3].sample(1264); 448 s15[7].sample(5223); 449 s15[0].sample(1234); 450 s15[0].sample(5434); 451 s15[3].sample(8634); 452 curTick += ULL(1000000); 453 s15[1].sample(1234); 454 455 s4 = curTick; 456 457 s8[3] = 99999; 458 459 s3 = 12; 460 s3++; 461 curTick += 9; 462 463 s1 = 9; 464 s1 += 9; 465 s1 -= 11; 466 s1++; 467 ++s1; 468 s1--; 469 --s1; 470 471 s2 = 9; 472 473 s5[0] += 1; 474 s5[1] += 2; 475 s5[2] += 3; 476 s5[3] += 4; 477 s5[4] += 5; 478 479 s7[0] = 10; 480 s7[1] = 20; 481 s7[2] = 30; 482 s7[3] = 40; 483 s7[4] = 50; 484 s7[5] = 60; 485 s7[6] = 70; 486 487 s6.sample(0); 488 s6.sample(1); 489 s6.sample(2); 490 s6.sample(3); 491 s6.sample(4); 492 s6.sample(5); 493 s6.sample(6); 494 s6.sample(7); 495 s6.sample(8); 496 s6.sample(9); 497 498 bin2.activate(); 499 s6.sample(10); 500 s6.sample(10); 501 s6.sample(10); 502 s6.sample(10); 503 s6.sample(10); 504 s6.sample(10); 505 s6.sample(10); 506 s6.sample(10); 507 s6.sample(11); 508 s6.sample(19); 509 s6.sample(20); 510 s6.sample(20); 511 s6.sample(21); 512 s6.sample(21); 513 s6.sample(31); 514 s6.sample(98); 515 s6.sample(99); 516 s6.sample(99); 517 s6.sample(99); 518 519 s7[0] = 700; 520 s7[1] = 600; 521 s7[2] = 500; 522 s7[3] = 400; 523 s7[4] = 300; 524 s7[5] = 200; 525 s7[6] = 100; 526 527 s9.sample(100); 528 s9.sample(100); 529 s9.sample(100); 530 s9.sample(100); 531 s9.sample(10); 532 s9.sample(10); 533 s9.sample(10); 534 s9.sample(10); 535 s9.sample(10); 536 537 curTick += 9; 538 s4 = curTick; 539 s6.sample(100); 540 s6.sample(100); 541 s6.sample(100); 542 s6.sample(101); 543 s6.sample(102); 544 545 s12.sample(100); 546 547 if (text) { 548 Text out(cout); 549 out.descriptions = descriptions; 550 out.compat = compat; 551 out(); 552 } 553 554 if (!mysql_name.empty()) { 555 MySql out; 556 out.connect(mysql_host, mysql_user, mysql_passwd, "m5stats", 557 mysql_name, "test"); 558 out(); 559 } 560 561 return 0; 562}
|