개정판 8feb21df
ConvertProcess workingMemory Station.ini에 추가
Change-Id: I4ac4ca3d5e19de808583a1102a88987ed865e80c
ConvertService/ServiceBase/Markus.Service.Extensions/Helper/MathBytes.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Markus.Service.Helper |
|
8 |
{ |
|
9 |
public static class MathBytes |
|
10 |
{ |
|
11 |
public static long Bytes(double value, DataSizeType dataSize) |
|
12 |
{ |
|
13 |
return System.Convert.ToInt64(Math.Round((value * Math.Pow(1024, (int)dataSize)), 0)); |
|
14 |
} |
|
15 |
|
|
16 |
public static double BytesToDataUnit(long value, DataSizeType dataSize) |
|
17 |
{ |
|
18 |
return System.Convert.ToDouble((value / Math.Pow(1024, (int)dataSize))); |
|
19 |
} |
|
20 |
} |
|
21 |
|
|
22 |
public enum DataSizeType |
|
23 |
{ |
|
24 |
BYTE = 0,kB = 1,MB = 2,GB = 3,TB = 4 |
|
25 |
} |
|
26 |
} |
ConvertService/ServiceBase/Markus.Service.Extensions/Markus.Service.Extensions.csproj | ||
---|---|---|
66 | 66 |
</ItemGroup> |
67 | 67 |
<ItemGroup> |
68 | 68 |
<Compile Include="Helper\Compress.cs" /> |
69 |
<Compile Include="Helper\MathBytes.cs" /> |
|
69 | 70 |
<Compile Include="Helper\ObjectToBytesStringConvert.cs" /> |
70 | 71 |
<Compile Include="Helper\ConfigHelper.cs" /> |
71 | 72 |
<Compile Include="Exntensions\Encrypt.cs" /> |
ConvertService/ServiceBase/Markus.Service.Station/ApplicationDefine.cs | ||
---|---|---|
24 | 24 |
public const string MULTI_TRHEAD_MAX_PAGE = "MULTI_TRHEAD_MAX_PAGE"; |
25 | 25 |
public const string MIN_FONT_SIZE = "MIN_FONT_SIZE"; |
26 | 26 |
public const string USE_RESOLUTION = "USE_RESOLUTION"; |
27 |
public const string RELEASE_WORK_MEMORY = "RELEASE_WORK_MEMORY"; |
|
27 | 28 |
|
29 |
|
|
28 | 30 |
public const string SAVE_STATUS_INTERVAL = "SAVE_STATUS_INTERVAL"; |
29 | 31 |
public const string FITER_PROCECT = "FITER_PROCECT"; |
30 | 32 |
} |
ConvertService/ServiceBase/Markus.Service.Station/ServiceStation.cs | ||
---|---|---|
37 | 37 |
private int MinFontSize; |
38 | 38 |
private int UseResolution; |
39 | 39 |
private bool CreateProcessWindow; |
40 |
private long ReleaseWorkMemory; |
|
40 | 41 |
|
41 | 42 |
private int SaveStatusInterval; |
42 | 43 |
|
... | ... | |
90 | 91 |
|
91 | 92 |
UseResolution = System.Convert.ToInt16(config.GetValue(CONFIG_DEFINE.SERVICE, CONFIG_DEFINE.USE_RESOLUTION, "0")); |
92 | 93 |
|
93 |
// CONVERT DATABASE 연결 문자열 |
|
94 |
var workingMemory = System.Convert.ToDouble(config.GetValue(CONFIG_DEFINE.SERVICE, CONFIG_DEFINE.USE_RESOLUTION, "1.5")); |
|
95 |
|
|
96 |
ReleaseWorkMemory = MathBytes.Bytes(workingMemory, DataSizeType.GB); |
|
97 |
|
|
98 |
// CONVERT DATABASE 연결 문자열 |
|
94 | 99 |
MarkusDBConnectionString = AESEncrypter.Decrypt(config.GetValue(CONFIG_DEFINE.SERVICE, CONFIG_DEFINE.MARKUS_CONNECTION_STRING)); |
95 | 100 |
|
96 | 101 |
var projectList = config.GetValue(CONFIG_DEFINE.SERVICE, CONFIG_DEFINE.FITER_PROCECT,""); |
ConvertService/ServiceBase/Markus.Service.Station/ServiceStation.ini | ||
---|---|---|
26 | 26 |
# 기본 5 |
27 | 27 |
SAVE_STATUS_INTERVAL = 5 |
28 | 28 |
|
29 |
# Convert Process의 최대 메모리(GB) |
|
30 |
RELEASE_WORK_MEMORY = 2 |
|
31 |
|
|
29 | 32 |
# 구분자는 콤마 |
30 | 33 |
FITER_PROCECT = 110000,00000,111111 |
31 | 34 |
|
ConvertService/ServiceBase/Markus.Service.Station/StationService/ServiceStationTask.cs | ||
---|---|---|
44 | 44 |
OriginFilePath = convertitem.OriginfilePath, |
45 | 45 |
SaveDirectory = convertitem.ConvertPath, |
46 | 46 |
TempDirectory = DownloadTempFolder, |
47 |
ReleaseWorkMemory = 1073741824,
|
|
47 |
ReleaseWorkMemory = ReleaseWorkMemory,
|
|
48 | 48 |
MultiThreadMaxPages = MultiThreadMaxPages, |
49 | 49 |
MinFontSize = MinFontSize, |
50 | 50 |
SendStatusInterval = SaveStatusInterval, |
내보내기 Unified diff