kezhenxu94 commented on a change in pull request #2840: Support exporter runs 
in increment and total modes
URL: https://github.com/apache/skywalking/pull/2840#discussion_r291810212
 
 

 ##########
 File path: 
oap-server/exporter/src/main/java/org/apache/skywalking/oap/server/exporter/provider/grpc/GRPCExporter.java
 ##########
 @@ -56,9 +56,15 @@ public GRPCExporter(GRPCExporterSetting setting) {
         subscriptionSet = new HashSet<>();
     }
 
-    @Override public void export(MetricsMetaInfo meta, Metrics metrics) {
-        if (subscriptionSet.size() == 0 || 
subscriptionSet.contains(meta.getMetricsName())) {
-            exportBuffer.produce(new ExportData(meta, metrics));
+    @Override public void export(ExportEvent event) {
+        if (ExportEvent.EventType.TOTAL.equals(event.getType())) {
 
 Review comment:
   `EventType` is enum type so we can just replace `.equals` with `==`? As you 
said in another comment (I don't exactly remember which one), it reduce a 
unnecessary call stack frame

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to