nodes/stats is useful to view the performance of ingest nodes pipelines, showing how many events and how long it took to process events through the different processors. Nodes stats always shows the processors in the same order in which they are defined. However due to some internal code level reasons the name of the processor and type of the processor may be misleading when an `if` condition is present. 

Given the following time pipeline (the script is designed to be slow to show the time it took)

```
PUT _ingest/pipeline/mypipeline
{
  "processors": [
    {
      "set": {
        "field": "a",
        "value": "bl"
      }
    },
    {
      "script": {
        "if": "true",
        "source": " String a = ''; for(int i =0 ;i < 2147483647/10000; i ++){ a = a + 'x'}"
      }
    },
    {
      "uppercase": {
        "if": "true",
        "field": "a",
        "on_failure": [
          {
            "set": {
              "field": "error",
              "value": "true"
            }
          }
        ]
      }
    }
  ]
}

PUT test/_doc/1?pipeline=mypipeline
{}

GET _nodes/stats?filter_path=nodes.**.pipelines.mypipeline
```

Will result in : 
```
{
  "nodes" : {
    "xSq7F7CDR7mlUTgw4zu2pg" : {
      "ingest" : {
        "pipelines" : {
          "mypipeline" : {
            "count" : 1,
            "time_in_millis" : 5406,
            "current" : 0,
            "failed" : 0,
            "processors" : [
              {
                "set" : {
                  "type" : "set",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 0,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              },
              {
                "script" : {
                  "type" : "conditional",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 5406,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              },
              {
                "compound:CompoundProcessor-null-null" : {
                  "type" : "conditional",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 0,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}
```
The first processor output is correct. 
The second processor shows `"type" : "conditional"`
The third processor also shows `"type" : "conditional"`, but also has the name `compound:CompoundProcessor-null-null` (it should be "uppercase" in reference to the processor name)

This is due to how the conditional 'if' is implemented as well as the on-failure handler. 

As a work around, one can identify which processor the stats are for by counting top down, it will be the same order as the pipeline is defined. 

server/src/main/java/org/elasticsearch/ingest/IngestService.java
}
    }
    public Map<String, Processor.Factory> getProcessorFactories() {
        return processorFactories;
    }
    @Override
    public IngestInfo info() {
        Map<String, Processor.Factory> processorFactories = getProcessorFactories();
        List<ProcessorInfo> processorInfoList = new ArrayList<>(processorFactories.size());
        for (Map.Entry<String, Processor.Factory> entry : processorFactories.entrySet()) {
            processorInfoList.add(new ProcessorInfo(entry.getKey()));
        }
        return new IngestInfo(processorInfoList);
    }
    Map<String, PipelineHolder> pipelines() {
        return pipelines;
    }
    /**
     * Recursive method to obtain all of the non-failure processors for given compoundProcessor. Since conditionals are implemented as
     * wrappers to the actual processor, always prefer the actual processor's metric over the conditional processor's metric.
     * @param compoundProcessor The compound processor to start walking the non-failure processors
     * @param processorMetrics The list of {@link Processor} {@link IngestMetric} tuples.
     * @return the processorMetrics for all non-failure processor that belong to the original compoundProcessor
     */
    private static List<Tuple<Processor, IngestMetric>> getProcessorMetrics(
        CompoundProcessor compoundProcessor,
        List<Tuple<Processor, IngestMetric>> processorMetrics
    ) {
        
        for (Tuple<Processor, IngestMetric> processorWithMetric : compoundProcessor.getProcessorsWithMetrics()) {