php-framework-benchmark icon indicating copy to clipboard operation
php-framework-benchmark copied to clipboard

Benchmark bad variable name

Open hscstudio opened this issue 9 years ago • 15 comments

I just do this benchmark on my droplet Digital Ocean, I have git clone, and do

sh setup.sh laravel-5.1/ ci-3.0/ yii-2.0/

Success, but when I do

sh benchmark.sh laravel-5.1/ ci-3.0/ yii-2.0/

produce following error

benchmark.sh: 12: export: ci-3.0/: bad variable name

But if benchmark one by one its run well

sh benchmark.sh laravel-5.1/

hscstudio avatar Feb 08 '16 23:02 hscstudio

I don't know why only benchmark.sh produce the error. It seems they are using the same code.

How about this?

sh benchmark.sh laravel-5.1 ci-3.0 yii-2.0

kenjis avatar Feb 09 '16 12:02 kenjis

It's same. produce the erorr too.

now, I comment and uncomment file list.sh, so I can benchmark specific framework only.

hscstudio avatar Feb 11 '16 03:02 hscstudio

@hscstudio can you please check, if my pull request (#52) fixes it?

cebe avatar Feb 11 '16 14:02 cebe

still produce same error

hscstudio avatar Feb 11 '16 21:02 hscstudio

What shell do you use?

kenjis avatar Feb 13 '16 04:02 kenjis

I use putty to acces my droplet in DO

hscstudio avatar Feb 14 '16 12:02 hscstudio

@hscstudio No, no. It is not your shell. It is your terminal application or ssh client application.

Please run the command below in DO environment:

$ echo $SHELL

You can see the shell which you use.

kenjis avatar Feb 14 '16 12:02 kenjis

First at all, thank you for providing us with this benchmarking tool, this is really usefull.

I just wanted to mention that I run into the same problem and managed to solved it by using the right shell command (so "bash benchmark.sh ..." instead of "sh benchmark.sh ..." in my case).

http://www.linuxquestions.org/questions/linux-newbie-8/a-simple-bash-command-causing-bad-variable-name-790082/

Fly06-Fr avatar Mar 17 '16 19:03 Fly06-Fr

@Fly06-Fr Thank you for your information!

@hscstudio Please try this:

$ bash benchmark.sh laravel-5.1/ ci-3.0/ yii-2.0/

kenjis avatar Mar 18 '16 01:03 kenjis

Hi Kenjis,

Memory statistics are always null in the table summary.

Any clue about this?

Thanks.

Fly06-Fr avatar Mar 18 '16 07:03 Fly06-Fr

You can't get them, if you don't use Apache.

kenjis avatar Mar 18 '16 09:03 kenjis

I'm using Apache.

So what's wrong?

Fly06-Fr avatar Mar 18 '16 19:03 Fly06-Fr

Do you see memory statistics when you see hello world pages with your brower?

kenjis avatar Mar 18 '16 22:03 kenjis

My fault sorry.

I didn't have the correct DocumentRoot in my Apache conf. It's ok now.

I have a last question: How should I proceed to add another framework to your benchmarking tool?

Fly06-Fr avatar Mar 19 '16 09:03 Fly06-Fr

See source code of existing frameworks, please. For example, https://github.com/kenjis/php-framework-benchmark/commits/master/ci-4.0-dev

kenjis avatar Mar 19 '16 11:03 kenjis