-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from yangyao/queue
Add helper function to verify is performance test
- Loading branch information
Showing
10 changed files
with
100 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* TikTokShop CommonHelper | ||
* | ||
* @author AfterShip <[email protected]> | ||
* @copyright 2023 AfterShip | ||
* @license MIT http://opensource.org/licenses/MIT | ||
* @link https://aftership.com | ||
*/ | ||
|
||
namespace AfterShip\TikTokShop\Helper; | ||
|
||
/** | ||
* CommonHelper helper function. | ||
* | ||
* @author AfterShip <[email protected]> | ||
* @license MIT http://opensource.org/licenses/MIT | ||
* @link https://aftership.com | ||
*/ | ||
class CommonHelper | ||
{ | ||
/** | ||
* Check if is running under PerformanceTest | ||
* | ||
* @return bool | ||
*/ | ||
public function isRunningUnderPerformanceTest() | ||
{ | ||
$backtrace = debug_backtrace(); | ||
foreach ($backtrace as $trace) { | ||
if (isset($trace['function']) | ||
&& isset($trace['file']) | ||
&& (strpos($trace['file'], 'GenerateFixturesCommand') !== false) | ||
) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> | ||
<module name="AfterShip_TikTokShop" setup_version="1.0.11" schema_version="1.0.11"> | ||
<module name="AfterShip_TikTokShop" setup_version="1.0.12" schema_version="1.0.12"> | ||
</module> | ||
</config> |