Giter VIP home page Giter VIP logo

transformalize.transform.csharp's Introduction

Overview

This adds C# transform to Transformalize. This plug-in ships with the Transformalize CLI.

Usage

<cfg name="Test">
   <entities>
      <add name="Test">
         <rows>
            <add text="SomethingWonderful" number="2" />
         </rows>
         <fields>
            <add name="text" />
            <add name="number" type="int" />
         </fields>
         <calculated-fields>
            <add name="csharp" t='cs(return text + " " + number;)' />
         </calculated-fields>
      </add>
   </entities>
</cfg>

This produces SomethingWonderful 2

Warning

Note: The first time this runs, it is susceptible to a known memory leak associated with compiling and running c# code within a process.

If you use this transform in a long-running process, it's recommended to set a max-memory in the root node (e.g. <cfg max-memory="500 mb" />). The Transformalize CLI honors the max memory setting, and will exit if it's exceeded.

Benchmark

BenchmarkDotNet=v0.11.4, OS=Windows 10.0.17134.407 (1803/April2018Update/Redstone4)
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
Frequency=2742189 Hz, Resolution=364.6722 ns, Timer=TSC
  [Host]       : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.3221.0
  LegacyJitX64 : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 64bit LegacyJIT/clrjit-v4.7.3221.0;compatjit-v4.7.3221.0

Job=LegacyJitX64  Jit=LegacyJit  Platform=X64  
Runtime=Clr  

Method Mean Error StdDev Ratio RatioSD
'7777 rows' 727.8 ms 4.662 ms 4.133 ms 1.00 0.00
'7777 rows with csharp' 750.3 ms 14.764 ms 18.131 ms 1.04 0.03

transformalize.transform.csharp's People

Contributors

dalenewman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.