On 5/23/18 7:39 AM, Bob Vandette wrote:
Should this be an instance method?  like
cpuacct.getLongValue("cpuacct.usage”);
>
I did it this way in order to provide a centralized place to check
for missing subsystems.  The getLongValue method does the checking
for all subsystems

 137         if (subsystem == null) return 0L;

should this throw NPE?  same applies to all getXXXValue methods.

I think instance methods are appropriate since they obtain
the stat for a given subsystem unless null subsystem can
be passed as argument?

  73     public String Path() {
  74         return path;
  75     }

Just notice the method name "Path()" - should be lowercase "path()"?

Not sure what this is in reference to, please advise?

  51     private static final Metrics instance = initContainerSubSystems();
  53     private static final String providerName = "cgroupv1";

INSTANCE and PROVIDER_NAME

What does java --help-extra show?  The help message should include
 -XshowSettings:system only on Linux.

The message looks like it comes out of a resource file will need to
be localized. How do we make the message conditional on operating
system in that case? Can I just put (Linux Only) in the english
version and then get it localized?

The existing launcher.properties lists platform-specific options
in text form:

The following options are Mac OS X specific:\n\
    -XstartOnFirstThread
    :

That's one possibility.

Here’s the new output:

./java -XshowSettings:system

Thanks for trimming the output.

I’ll be sending out a webrev that includes the tests next week once
I’ve integrated them with my change and perform some testing on
different Linux systems and docker containers.

Sounds good.

Thanks
Mandy

Reply via email to