anchor.diff:  if [%MobiusJarDir%] == [] set MobiusJarDir=d:\mobius\perf-lz\dependencies
   if [%LogDir%] == [] set LogDir=D:\mobius\perf-logs
   if [%LogName%] == [] set LogName=perf--by-%USERNAME%--on-%hostname%.log
  +if not defined PerfTestTmpDir set PerfTestTmpDir=D:\Temp\TempDirForSpark
  +if not defined PerfTestData set PerfTestData=hdfs:///perf/data/deletions/*
   
  -if [%JarOptions%]==[] set JarOptions=--jars %MobiusJarDir%\spark-csv_2.10-1.4.0.jar,%MobiusJarDir%\commons-csv-1.4.jar
  -
  -set eventOptions=--conf spark.eventLog.enabled=true --conf spark.eventLog.dir=hdfs:///perf/eventlog
  +rem JarOptions and EventOptions will not effect if defined SparkOptions
  +if not defined JarOptions set JarOptions=--jars %MobiusJarDir%\spark-csv_2.10-1.4.0.jar,%MobiusJarDir%\commons-csv-1.4.jar
  +if not defined EventOptions set EventOptions=--conf spark.eventLog.enabled=true --conf spark.eventLog.dir=hdfs:///perf/eventlog
   
   set PerfExeName=SparkCLRPerf.exe
   
  
positive.code:     rem Append args as name tail to be obvious when lookup on cluster web page    
      call %CommonToolDir%\bat\get-appendix-name-from %SparkOptions%
      set submitArgs=--name %appName%-run-%PerfRunCount%__%AppNameBySparkOptions% %SparkOptions% --exe SparkCLRPerf.exe %exeDir% %args%
      echo %date% %time% sparkclr-submit.cmd %submitArgs%
      echo %date% %time% sparkclr-submit.cmd %submitArgs% >> %logPath%
      call sparkclr-submit.cmd %submitArgs%  2>&1 | lzmw -it "tracking URL|final status" -PC -c -T 2 >> %logPath%
      echo. >> %logPath%
      
  
negative.code: @echo off
  rem Submit and compare new and old performance test on cluster by default.
  rem Example :
  rem set OldPerfExeDir=d:\msgit\Mobius-1.6.200-PREVIEW-1\csharp\Perf\Microsoft.Spark.CSharp\bin\Release
  rem set NewPerfExeDir=d:\msgit\revMobius\csharp\Perf\Microsoft.Spark.CSharp\bin\Release
  rem set JarOptions=--jars d:\msgit\Mobius-1.6.200-PREVIEW-1\build\dependencies\commons-csv-1.1.jar,d:\msgit\Mobius-1.6.200-PREVIEW-1\build\dependencies\spark-csv_2.10-1.3.0.jar
  rem set SparkOptions=--master yarn-cluster --total-executor-cores 50 --executor-memory 8G --conf spark.eventLog.enabled=true --conf spark.eventLog.dir=hdfs:///perf/eventlog %JarOptions%
  rem set OldPerfAppName=SparkCLRPerf.exe-Mobius-1.6.200-PREVIEW-1
  rem set JustShowCmd=1
  
  SetLocal EnableDelayedExpansion
  
  set ShellDir=%~dp0
  if %ShellDir:~-1%==\ set ShellDir=%ShellDir:~0,-1%
  set CommonToolDir=%ShellDir%\..\..\tools
  call %CommonToolDir%\set-common-dir-and-tools.bat
  
  for /F "tokens=*" %%a in (' hostname ') do set hostname=%%a
  
  if "%~1" == "" (
      echo Usage  :  %0  PerfRunCount [SubmitTimes]  [NewPerfExeDir]       [OldPerfExeDir]            [MobiusJarDir]           [LogDir]               [LogName]
      echo Example : %0  1             1            D:\mobius\new-test  D:\mobius\latest-master  d:\mobius\dependencies D:\mobius\perf-logs  perf--by-%USERNAME%--on-%hostname%.log
      echo To avoid default, you can set variables of the above and : OldPerfAppName NewPerfAppName JarOptions SparkOptions .
      echo Such as :
      echo set OldPerfExeDir=D:\msgit\orgMobius\csharp\Perf\Microsoft.Spark.CSharp\bin\Release
      echo set NewPerfExeDir=D:\msgit\lqmMobius\csharp\Perf\Microsoft.Spark.CSharp\bin\Release
      echo set OldPerfAppName=org-perf 
      echo set NewPerfAppName=new-perf
      rem echo set MobiusJarDir=d:\mobius\perf-lz\dependencies
      echo set PerfTestData=hdfs:///perf/data/deletions/*
      echo set PerfTestTmpDir=D:\Temp\TempDirForSpark
      echo set JustShowCmd=1 will just print the final command and not execute submitting.
      exit /b 5
  )
  
  