Skip to content

Conversation

@agrison
Copy link
Contributor

@agrison agrison commented Apr 25, 2014

agrison added 2 commits April 25, 2014 17:21
Adding benchmark support for Martini, a web framework for  Go.

See: https://github.com/martini/martini
Set the environment to `Prod` avoiding recompilation of
`templates/fortunes.tmpl` on each request and thus avoiding the
following error `http: panic serving 127.0.0.1:58799: open
templates/fortunes.tmpl: too many open files`
Copy link
Contributor

Choose a reason for hiding this comment

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

does Fatalf() exit the process automatically ?
I haven't used Go so just wondering why you'd let it continue after this fatal error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

log.Fatalf logs then exit with error code 1.
See: http://golang.org/pkg/log/#Fatalf

@martin-g
Copy link
Contributor

👍

agrison added 2 commits April 27, 2014 22:51
Test #3 and #5 are expected to return a list/array.
There’s no need to check for the ?queries argument to be 1 and in that
case return an object instead of a list.
@agrison agrison changed the title Adding support for Martini framework Adding support for Martini & Goji frameworks - Go May 1, 2014
@bhauer
Copy link
Contributor

bhauer commented May 6, 2014

@agrison Thanks for this contribution! We will aim to have this merged in for Round 10.

goji/setup.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

When shell=True, command passed to subprocess.call should be str, not list.
So .rsplit(" ") should removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

subprocess.call() waits command finished.
Use Popen instead.

martini/setup.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

env=env throws an exception

Copy link
Contributor

Choose a reason for hiding this comment

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

@agrison In addition to alex's comment on env=env, I'll add that it's useless here. Your entire environment is persisted into the subprocess by default, including that snazzy GOPATH update above ;-) Please remove env=env from all of these subprocess lines

@aschneider-techempower
Copy link
Contributor

After correcting the env=env thing, a few of the tests still fail. Goji

For Martini, it seems to want the user to log into github. Please fix that.

goji/setup.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Per some changes in #915, please remove this line. Add a new file at goji/bash_profile.sh, and inside it put the line export GOPATH=$TROOT

here's an example bash_profile.sh for the go framework

@hamiltont
Copy link
Contributor

@agrison Awesome to see a few more go tests! If you will rebase this onto our master branch, and then update the .travis.yml file to add lines for Martini & Goji, Travis-CI will verify that your additions work properly and can be merged

A number of the comments here are minor changes. If you would like a working example, please consult the latest go directory as it works perfectly at the moment

achlipala and others added 11 commits August 28, 2014 09:16
Ur/Web: Cleanup config file
Adding benchmark support for Martini, a web framework for  Go.

See: https://github.com/martini/martini
Set the environment to `Prod` avoiding recompilation of
`templates/fortunes.tmpl` on each request and thus avoiding the
following error `http: panic serving 127.0.0.1:58799: open
templates/fortunes.tmpl: too many open files`
Test #3 and #5 are expected to return a list/array.
There’s no need to check for the ?queries argument to be 1 and in that
case return an object instead of a list.
@agrison
Copy link
Contributor Author

agrison commented Sep 12, 2014

@hamiltont I've rebased my branch onto master but the travis build is not working, I don't know why but it keeps trying to update something on the linux box and fail because the apt-get is waiting for input on :

Configuration file `/etc/rsyslog.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** rsyslog.conf (Y/I/N/O/D/Z) [default=N] ? 

Then it gets stuck and won't continue. I can't see any difference with the other Go frameworks. Any advice ?

Example: https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/35114986

Sorry for the delay I was not able to find some time to work on that lately and was in vacation all the summer.

@hamiltont
Copy link
Contributor

I think you can add -o Dpkg::Options::="--force-confdef" -o
Dpkg::Options::="--force-confold" to your apt command to automatically make
a selection here.

Head's up - I'm going to have very little presence here for the next month
or two, so ping the TE team if you need help

On Fri, Sep 12, 2014 at 9:26 AM, Alexandre Grison [email protected]
wrote:

@hamiltont https://github.com/hamiltont I've rebased my branch onto
master but the travis build is not working, I don't know why but it keeps
trying to update something on the linux box and failed because the apt-get
is waiting for input on :

Configuration file `/etc/rsyslog.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** rsyslog.conf (Y/I/N/O/D/Z) [default=N] ?

Then it gets staled and won't continue. I can't see any difference with
the other Go frameworks. Any advice ?

Example:
https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/35114986

Sorry for the delay I was not able to find some time to work on that
lately and was in vacation all the summer.


Reply to this email directly or view it on GitHub
#837 (comment)
.

@agrison
Copy link
Contributor Author

agrison commented Sep 13, 2014

Ok thanks @hamiltont , I think I'll check about that, the problem is that the apt-get commands are being issued automatically, it seems I don't have control about that.

@hamiltont
Copy link
Contributor

I've restarted the last travis build as this rsyslog stuff should be fixed in master

@hamiltont
Copy link
Contributor

Ping @agrison - the restarted travis build has finished. Looks like there are a few remaining issues with goji, and there's something causing the start method of your setup.py for martini to hang forever

@msmith-techempower
Copy link
Member

@agrison There were SOOOO many changes to the suite in the last few weeks - I would prefer a rebase from master to give Travis another chance.

@LadyMozzarella
Copy link
Contributor

Closing because another implementation of Goji has been added to TFB and the Martini framework is no longer available on Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants