On 2012/01/31 08:20:47, techtonik wrote: > This seems to duplicate patch from http://codereview.appspot.com/5552045/ > Otherwise ...
14 years, 4 months ago
(2012-01-31 18:33:26 UTC)
#2
On 2012/01/31 08:20:47, techtonik wrote:
> This seems to duplicate patch from http://codereview.appspot.com/5552045/
> Otherwise looks good to me.
I have a merge of the two patches somewhere on a machine I can't reach until
tonight. I'll submit as a branch named 'py27'. FWIW what do you think of using
a different namespace in memcache for the appstats values per version?
On 2012/01/31 18:33:26, GvR wrote: > On 2012/01/31 08:20:47, techtonik wrote: > > This seems ...
14 years, 4 months ago
(2012-02-01 03:46:34 UTC)
#3
On 2012/01/31 18:33:26, GvR wrote:
> On 2012/01/31 08:20:47, techtonik wrote:
> > This seems to duplicate patch from http://codereview.appspot.com/5552045/
> > Otherwise looks good to me.
>
> I have a merge of the two patches somewhere on a machine I can't reach until
> tonight. I'll submit as a branch named 'py27'. FWIW what do you think of
using
> a different namespace in memcache for the appstats values per version?
Ok, this is now pushed to the repo as branch py27.
On 2012/01/31 18:33:26, GvR wrote: > On 2012/01/31 08:20:47, techtonik wrote: > > This seems ...
14 years, 3 months ago
(2012-02-16 12:53:57 UTC)
#4
On 2012/01/31 18:33:26, GvR wrote:
> On 2012/01/31 08:20:47, techtonik wrote:
> > This seems to duplicate patch from http://codereview.appspot.com/5552045/
> > Otherwise looks good to me.
>
> I have a merge of the two patches somewhere on a machine I can't reach until
> tonight. I'll submit as a branch named 'py27'. FWIW what do you think of
using
> a different namespace in memcache for the appstats values per version?
Is the memcache shared between the instances?
How do you access the stats to compare?
I can't see the interface for that on https://appengine.google.com/
On Thu, Feb 16, 2012 at 4:53 AM, <techtonik@gmail.com> wrote: > Is the memcache shared ...
14 years, 3 months ago
(2012-02-16 17:50:53 UTC)
#5
On Thu, Feb 16, 2012 at 4:53 AM, <techtonik@gmail.com> wrote:
> Is the memcache shared between the instances?
Like datastore, memcache is shared between all versions of an app. If
you don't otherwise use namespaces, you can use the namespace to let
each version use its own section of memcache (although if you have
code that tries to maintain some synchronization between datastore and
memcache, this may not work).
But Appstats always uses a "special" namespace to record its data.
This namespace default to __appstats__, but if you want to compare
between versions, it's actually useful to make this vary between
versions as well. You can automate this based on the
CURRENT_VERSION_ID environment variable. However that changes each
time you re-upload the same version; to use only the "minor" version,
you have to parse the part before the dot. E.g.:
version_id = os.getenv('CURRENT_VERSION_ID', '.')
major, minor = version_id.split('.', 1)
appstats_KEY_NAMESPACE = '__%s_appstats__' % major
> How do you access the stats to compare?
> I can't see the interface for that on https://appengine.google.com/
Not sure I understand the question. With the above change in place
(which you are free to do!) you should be able to go to /_ah/stats on
each version of the app, e.g. 91.codereview.appspot.com/_ah/stats to
access stats for version 91.
--
--Guido van Rossum (python.org/~guido)
On Thu, Feb 16, 2012 at 8:50 PM, Guido van Rossum <guido@python.org> wrote: > On ...
14 years, 3 months ago
(2012-02-17 06:50:09 UTC)
#6
On Thu, Feb 16, 2012 at 8:50 PM, Guido van Rossum <guido@python.org> wrote:
> On Thu, Feb 16, 2012 at 4:53 AM, <techtonik@gmail.com> wrote:
> > Is the memcache shared between the instances?
>
> Like datastore, memcache is shared between all versions of an app. If
> you don't otherwise use namespaces, you can use the namespace to let
> each version use its own section of memcache (although if you have
> code that tries to maintain some synchronization between datastore and
> memcache, this may not work).
>
> But Appstats always uses a "special" namespace to record its data.
> This namespace default to __appstats__, but if you want to compare
> between versions, it's actually useful to make this vary between
> versions as well. You can automate this based on the
> CURRENT_VERSION_ID environment variable. However that changes each
> time you re-upload the same version; to use only the "minor" version,
> you have to parse the part before the dot. E.g.:
>
> version_id = os.getenv('CURRENT_VERSION_ID', '.')
> major, minor = version_id.split('.', 1)
> appstats_KEY_NAMESPACE = '__%s_appstats__' % major
This 'CURRENT_VERSION_ID' name doesn't look as a version ID - it is more an
upload ID.
> > How do you access the stats to compare?
> > I can't see the interface for that on https://appengine.google.com/
>
> Not sure I understand the question. With the above change in place
> (which you are free to do!) you should be able to go to /_ah/stats on
> each version of the app, e.g. 91.codereview.appspot.com/_ah/stats to
> access stats for version 91.
The question was - how _ah/stats knows which prefix to use for showing
statistics? In main.py we import appengine_config.py explicitly, so
_ah/stats handler should implicitly import this file to grab its settings,
and if the file is imported implicitly anyway - what's the point in doing
this in main.py?
--
anatoly t.
On Thu, Feb 16, 2012 at 10:49 PM, anatoly techtonik <techtonik@gmail.com> wrote: > On Thu, ...
14 years, 3 months ago
(2012-02-18 03:10:19 UTC)
#7
On Thu, Feb 16, 2012 at 10:49 PM, anatoly techtonik <techtonik@gmail.com> wrote:
> On Thu, Feb 16, 2012 at 8:50 PM, Guido van Rossum <guido@python.org> wrote:
>>
>> On Thu, Feb 16, 2012 at 4:53 AM, <techtonik@gmail.com> wrote:
>> > Is the memcache shared between the instances?
>>
>> Like datastore, memcache is shared between all versions of an app. If
>> you don't otherwise use namespaces, you can use the namespace to let
>> each version use its own section of memcache (although if you have
>> code that tries to maintain some synchronization between datastore and
>> memcache, this may not work).
>>
>> But Appstats always uses a "special" namespace to record its data.
>> This namespace default to __appstats__, but if you want to compare
>> between versions, it's actually useful to make this vary between
>> versions as well. You can automate this based on the
>> CURRENT_VERSION_ID environment variable. However that changes each
>> time you re-upload the same version; to use only the "minor" version,
>> you have to parse the part before the dot. E.g.:
>>
>> version_id = os.getenv('CURRENT_VERSION_ID', '.')
>> major, minor = version_id.split('.', 1)
>> appstats_KEY_NAMESPACE = '__%s_appstats__' % major
>
>
> This 'CURRENT_VERSION_ID' name doesn't look as a version ID - it is more an
> upload ID.
Read the code again. :-) It puts the version from app.yaml in 'major'.
>> > How do you access the stats to compare?
>> > I can't see the interface for that on https://appengine.google.com/
>>
>> Not sure I understand the question. With the above change in place
>> (which you are free to do!) you should be able to go to /_ah/stats on
>> each version of the app, e.g. 91.codereview.appspot.com/_ah/stats to
>> access stats for version 91.
>
>
> The question was - how _ah/stats knows which prefix to use for showing
> statistics? In main.py we import appengine_config.py explicitly, so
> _ah/stats handler should implicitly import this file to grab its settings,
> and if the file is imported implicitly anyway - what's the point in doing
> this in main.py?
I don't recall why main imports it, but it's probably related to
Django, not to Appstats. I still don't know what you mean by prefix --
are you perhaps referring to the function appstats_normalize_path()
defined in appengine_config.py? That is used by the Appstats UI only.
--
--Guido van Rossum (python.org/~guido)
On Sat, Feb 18, 2012 at 6:09 AM, Guido van Rossum <guido@python.org> wrote: > On ...
14 years, 3 months ago
(2012-02-18 04:18:00 UTC)
#8
On Sat, Feb 18, 2012 at 6:09 AM, Guido van Rossum <guido@python.org> wrote:
> On Thu, Feb 16, 2012 at 10:49 PM, anatoly techtonik <techtonik@gmail.com>
> wrote:
> > On Thu, Feb 16, 2012 at 8:50 PM, Guido van Rossum <guido@python.org>
> wrote:
> >> > How do you access the stats to compare?
> >> > I can't see the interface for that on https://appengine.google.com/
> >>
> >> Not sure I understand the question. With the above change in place
> >> (which you are free to do!) you should be able to go to /_ah/stats on
> >> each version of the app, e.g. 91.codereview.appspot.com/_ah/stats to
> >> access stats for version 91.
> >
> >
> > The question was - how _ah/stats knows which prefix to use for showing
> > statistics? In main.py we import appengine_config.py explicitly, so
> > _ah/stats handler should implicitly import this file to grab its
> settings,
> > and if the file is imported implicitly anyway - what's the point in doing
> > this in main.py?
>
> I don't recall why main imports it, but it's probably related to
> Django, not to Appstats. I still don't know what you mean by prefix --
> are you perhaps referring to the function appstats_normalize_path()
> defined in appengine_config.py? That is used by the Appstats UI only.
My mistake. Not "prefix", but "namespace" or "appstats key". Appstats UI
has a different entrypoint, not main.py, so I wondered how it knows proper
namespace. It doesn't import appengine_config.py, so that should be done
implicitly somewhere, perhaps in run_bare_wsgi_app().
--
anatoly t.
On Fri, Feb 17, 2012 at 8:17 PM, anatoly techtonik <techtonik@gmail.com> wrote: > On Sat, ...
14 years, 3 months ago
(2012-02-18 04:25:03 UTC)
#9
On Fri, Feb 17, 2012 at 8:17 PM, anatoly techtonik <techtonik@gmail.com> wrote:
> On Sat, Feb 18, 2012 at 6:09 AM, Guido van Rossum <guido@python.org> wrote:
>>
>> On Thu, Feb 16, 2012 at 10:49 PM, anatoly techtonik <techtonik@gmail.com>
>> wrote:
>> > On Thu, Feb 16, 2012 at 8:50 PM, Guido van Rossum <guido@python.org>
>> > wrote:
>> >> > How do you access the stats to compare?
>> >> > I can't see the interface for that on https://appengine.google.com/
>> >>
>> >> Not sure I understand the question. With the above change in place
>> >> (which you are free to do!) you should be able to go to /_ah/stats on
>> >> each version of the app, e.g. 91.codereview.appspot.com/_ah/stats to
>> >> access stats for version 91.
>> >
>> >
>> > The question was - how _ah/stats knows which prefix to use for showing
>> > statistics? In main.py we import appengine_config.py explicitly, so
>> > _ah/stats handler should implicitly import this file to grab its
>> > settings,
>> > and if the file is imported implicitly anyway - what's the point in
>> > doing
>> > this in main.py?
>>
>> I don't recall why main imports it, but it's probably related to
>> Django, not to Appstats. I still don't know what you mean by prefix --
>> are you perhaps referring to the function appstats_normalize_path()
>> defined in appengine_config.py? That is used by the Appstats UI only.
>
>
> My mistake. Not "prefix", but "namespace" or "appstats key". Appstats UI has
> a different entrypoint, not main.py, so I wondered how it knows proper
> namespace. It doesn't import appengine_config.py, so that should be done
> implicitly somewhere, perhaps in run_bare_wsgi_app().
Actually appstats does -- via a complicated mechanism -- end up
reading the info from appengine_config.py. Follow the trail from
recording.py to lib_config. All this is documented (if sparsely):
http://code.google.com/appengine/docs/python/tools/appstats.html#OptionalConf...
--
--Guido van Rossum (python.org/~guido)
Issue 5574079: Port Rietveld to Py27
(Closed)
Created 14 years, 4 months ago by GvR
Modified 14 years, 3 months ago
Reviewers: techtonik, gvrpython
Base URL:
Comments: 0