Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: webrtc/voice_engine/test/auto_test/voe_stress_test.cc

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/test/auto_test/voe_stress_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 printf("Running %d loops with %d ms sleep. Mark every %d loop. \n", 328 printf("Running %d loops with %d ms sleep. Mark every %d loop. \n",
329 numberOfLoops, loopSleep, markInterval); 329 numberOfLoops, loopSleep, markInterval);
330 printf("Test will take approximately %d minutes. \n", 330 printf("Test will take approximately %d minutes. \n",
331 numberOfLoops * loopSleep / 1000 / 60 + 1); 331 numberOfLoops * loopSleep / 1000 / 60 + 1);
332 332
333 srand((unsigned int) time(NULL)); 333 srand((unsigned int) time(NULL));
334 int rnd(0); 334 int rnd(0);
335 335
336 // Start extra thread 336 // Start extra thread
337 _ptrExtraApiThread = ThreadWrapper::CreateThread(RunExtraApi, this, 337 _ptrExtraApiThread = PlatformThread::CreateThread(RunExtraApi, this,
338 "StressTestExtraApiThread"); 338 "StressTestExtraApiThread");
339 VALIDATE_STRESS(!_ptrExtraApiThread->Start()); 339 VALIDATE_STRESS(!_ptrExtraApiThread->Start());
340 340
341 // Some possible extensions include: 341 // Some possible extensions include:
342 // Add more API calls to randomize 342 // Add more API calls to randomize
343 // More threads 343 // More threads
344 // Different sleep times (fixed or random). 344 // Different sleep times (fixed or random).
345 // Make sure audio is OK after test has finished. 345 // Make sure audio is OK after test has finished.
346 346
347 // Call random API functions here and in extra thread, ignore any error 347 // Call random API functions here and in extra thread, ignore any error
348 for (i = 0; i < numberOfLoops; ++i) { 348 for (i = 0; i < numberOfLoops; ++i) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } else { 399 } else {
400 // Stop playout 400 // Stop playout
401 base->StopPlayout(0); 401 base->StopPlayout(0);
402 } 402 }
403 // --- END --- 403 // --- END ---
404 404
405 return true; 405 return true;
406 } 406 }
407 407
408 } // namespace voetest 408 } // namespace voetest
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/voe_stress_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698