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
if (v2Template != null) {
                    Settings settings = MetadataIndexTemplateService.resolveSettings(metadata, v2Template);
                    if (IndexSettings.DEFAULT_PIPELINE.exists(settings)) {
                        defaultPipeline = IndexSettings.DEFAULT_PIPELINE.get(settings);
                    }
                    if (IndexSettings.FINAL_PIPELINE.exists(settings)) {
                        finalPipeline = IndexSettings.FINAL_PIPELINE.get(settings);
                    }
                    indexRequest.setPipeline(Objects.requireNonNullElse(defaultPipeline, NOOP_PIPELINE_NAME));
                    indexRequest.setFinalPipeline(Objects.requireNonNullElse(finalPipeline, NOOP_PIPELINE_NAME));
                } else {
                    List<IndexTemplateMetadata> templates = MetadataIndexTemplateService.findV1Templates(
                        metadata,
                        indexRequest.index(),
                        null
                    );
                    
                    for (final IndexTemplateMetadata template : templates) {
                        final Settings settings = template.settings();
                        if (defaultPipeline == null && IndexSettings.DEFAULT_PIPELINE.exists(settings)) {
                            defaultPipeline = IndexSettings.DEFAULT_PIPELINE.get(settings);
                            
                        }
                        if (finalPipeline == null && IndexSettings.FINAL_PIPELINE.exists(settings)) {
                            finalPipeline = IndexSettings.FINAL_PIPELINE.get(settings);
                            
                        }
                        if (defaultPipeline != null && finalPipeline != null) {
                            
                            break;