-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 #1857 from magento-performance/MAGETWO-85581
[Performance] MAGETWO-85581: Enable metrics validation and run benchmark in multithread mode for PAT
- Loading branch information
Showing
28 changed files
with
24,220 additions
and
23,283 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
10 changes: 10 additions & 0 deletions
10
app/code/Magento/Catalog/Model/Product/Image/NotLoadInfoImageException.php
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,10 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Catalog\Model\Product\Image; | ||
|
||
class NotLoadInfoImageException extends \Exception | ||
{ | ||
} |
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
45 changes: 45 additions & 0 deletions
45
...gration/testsuite/Magento/Framework/Search/_files/products_with_the_same_search_score.php
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,45 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
use Magento\Catalog\Api\ProductRepositoryInterface; | ||
use Magento\Catalog\Model\Product; | ||
use Magento\Catalog\Model\Product\Attribute\Source\Status; | ||
use Magento\Catalog\Model\Product\Type; | ||
use Magento\Catalog\Model\Product\Visibility; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
|
||
Bootstrap::getInstance()->reinitialize(); | ||
|
||
/** @var ProductRepositoryInterface $productRepository */ | ||
$productRepository = Bootstrap::getObjectManager() | ||
->create(ProductRepositoryInterface::class); | ||
|
||
$howManyProducts = 5; | ||
|
||
foreach (range(1, $howManyProducts) as $productId) { | ||
$product = Bootstrap::getObjectManager()->create(Product::class); | ||
$product->setTypeId(Type::TYPE_SIMPLE) | ||
->setAttributeSetId(4) | ||
->setWebsiteIds([1]) | ||
->setName('Cool short' . $productId) | ||
->setSku('cool_shorts_' . $productId) | ||
->setPrice(42) | ||
->setShortDescription("Some description about shorts") | ||
->setTaxClassId(0) | ||
->setDescription('Some description about <b>shorts</b>') | ||
->setVisibility(Visibility::VISIBILITY_BOTH) | ||
->setStatus(Status::STATUS_ENABLED) | ||
->setStockData( | ||
[ | ||
'use_config_manage_stock' => 1, | ||
'qty' => 100, | ||
'is_qty_decimal' => 0, | ||
'is_in_stock' => 1, | ||
] | ||
); | ||
|
||
$productRepository->save($product); | ||
} |
21 changes: 21 additions & 0 deletions
21
...estsuite/Magento/Framework/Search/_files/products_with_the_same_search_score_rollback.php
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,21 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
/** @var \Magento\Framework\Registry $registry */ | ||
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); | ||
$registry = $objectManager->get(\Magento\Framework\Registry::class); | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', true); | ||
|
||
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */ | ||
$collection = $objectManager->create(\Magento\Catalog\Model\ResourceModel\Product\Collection::class); | ||
$collection->addAttributeToSelect('id')->load(); | ||
if ($collection->count() > 0) { | ||
$collection->delete(); | ||
} | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', 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
Oops, something went wrong.