Skip to content

Conversation

@akrabat
Copy link
Member

@akrabat akrabat commented Jun 8, 2018

This runtime uses an updated router.php which runs the action code in
the same process and enables PHP's OPcache byte-code cache. We also
read the /init config information using require rather than parsing a
JSON file.

This results in a significant performance improvement as can be seen
in the typical gatlingRun-LatencySimulation results on my dev machine.
The mean response times are:

  • Warm php:7.1 invocation : 70ms
  • Warm nodejs:8 invocation : 19ms
  • Warm php:7.2 invocation : 19ms

The change to router.php can also be applied to the PHP 7.1 action and it will see similar performance improvements.

This runtime uses an updated router.php which runs the action code in
the same process and enables PHP's OPcache byte-code cache. We also
read the /init config information using `require` rather than parsing a
JSON file.

This results in a significant performance improvement as can be seen
in the typical gatlingRun-LatencySimulation results on my dev machine.
The mean response times are:

* Warm php:7.1 invocation  : 70ms
* Warm nodejs:8 invocation : 19ms
* Warm php:7.2 invocation  : 19ms
Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the php.ini long and not require.
Other than that LGTM

@@ -0,0 +1,1948 @@
; Licensed to the Apache Software Foundation (ASF) under one or more
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file looks too big and boiler plate.
Can we have a short version with a few settings that we need to override

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@csantanapr csantanapr requested a review from rabbah June 8, 2018 17:36
@csantanapr csantanapr self-assigned this Jun 8, 2018
Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing tests
Rename Php71ActionContainerTests.scala to Php7ActionContainerTests.scala and make it abstract class
Then
Create Php71ActionContainerTests.scala class with junit annotation and with override of the image name pointing to 7.1
Create Php72ActionContainerTests.scala same here but pointing to 7.2 docker image

@csantanapr
Copy link
Member

The new test file should look like this if there it's the same set of tests as 7.1

package runtime.actionContainers

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class Php72ActionContainerTests extends Php7ActionContainerTests {

  override lazy val nodejsContainerImageName = "action-php-v7.2"
}

@akrabat
Copy link
Member Author

akrabat commented Jun 8, 2018

@csantanapr Tests added now!

Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@csantanapr csantanapr merged commit 86c0a91 into apache:master Jun 20, 2018
@akrabat akrabat deleted the php-7.2 branch February 14, 2021 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants