- 
                Notifications
    You must be signed in to change notification settings 
- Fork 508
Prefer set with copy_from #15279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Prefer set with copy_from #15279
Conversation
because copy_from is faster than value (when the value is a mustache template that merely does field access).
| 🚀 Benchmarks reportPackage  | 
| Data stream | Previous EPS | New EPS | Diff (%) | Result | 
|---|---|---|---|---|
| vpcflow | 4545.45 | 3048.78 | -1496.67 (-32.93%) | 💔 | 
To see the full report comment with /test benchmark fullreport
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
since the ctx itself is never null.
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
| 
 | 
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
| /test benchmark fullreport | 
| 💚 Build Succeeded
 History
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
| Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) | 




Proposed commit message
Prefer the
copy_fromoption of thesetprocessor for certain high volume integrations.When the field to be copied is already just a string, and so the set processor with mustache isn't being used for the side effect of converting to a string, then it's quite a bit faster to use
copy_fromrather thanvalue(with mustache templating).For example, in a large cluster that I was looking at a few minutes ago, the most expensive single
setprocessor is this one:It's taking 2.8 microseconds per doc, as compared to the average of all set processor invocations for the same pipeline which is only .6 microseconds per doc. The cluster in question is processing billions and billions of documents per hour, though, so microseconds add up (and this particularly-expensive set processor is the eighth-most expensive processor for the entire pipeline).
Originally this PR also had some
copy_fromchanges for thepanwintegration, but I've moved those changes into #15800.