publicstaticvoidCreateCounters() { CounterCreationDataCollection col = new CounterCreationDataCollection();
// Create custom counter objects CounterCreationData counter1 = new CounterCreationData(); counter1.CounterName = "Available Worker Threads"; counter1.CounterHelp = "The difference between the maximum number " + "of thread pool worker threads and the " + "number currently active."; counter1.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter2 = new CounterCreationData(); counter2.CounterName = "Available IO Threads"; counter2.CounterHelp = "The difference between the maximum number of " + "thread pool IO threads and the number "+ "currently active."; counter2.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter3 = new CounterCreationData(); counter3.CounterName = "Max Worker Threads"; counter3.CounterHelp = "The number of requests to the thread pool "+ "that can be active concurrently. All "+ "requests above that number remain queued until " + "thread pool worker threads become available."; counter3.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter4 = new CounterCreationData(); counter4.CounterName = "Max IO Threads"; counter4.CounterHelp = "The number of requests to the thread pool " + "that can be active concurrently. All "+ "requests above that number remain queued until " + "thread pool IO threads become available."; counter4.CounterType = PerformanceCounterType.NumberOfItems32;
// Add custom counter objects to CounterCreationDataCollection. col.Add(counter1); col.Add(counter2); col.Add(counter3); col.Add(counter4); // delete the category if it already exists if(PerformanceCounterCategory.Exists("MyAspNetThreadCounters")) { PerformanceCounterCategory.Delete("MyAspNetThreadCounters"); } // bind the counters to the PerformanceCounterCategory PerformanceCounterCategory category = PerformanceCounterCategory.Create("MyAspNetThreadCounters", "", col); } }
額外處理事項: 直接在 Jenkins server 發 pr 給 openshift 時,發生 503 錯誤。 使用 ssh 登入 openshift 看 log ,發現 Node Sass does not yet support your current environment 錯誤 必須登入執行以下語法修正模組問題 npm rebuild node-sass
建置作業,會得到錯誤訊息
1 2 3 4
上略... 19:44:46 Host key verification failed. 19:44:46 fatal: Could not read from remote repository. 下略...
原因:主機密鑰驗證失敗,這個錯誤的意思是我的 Jenkins Server 主機並不認得遠端的 Openshift Server 的 host key,主要的原因是 Jenkins Service 在執行的身份是 NT AUTHORITY\SYSTEM,由於我已經有合適權限的帳號,所以只需要切換執行 Jenkins Server 的身份即可。
一個處理器在一個時間段內其實只能做一件事,因為它只有一個個體、一個時空。而多任務操作系統把一個長時間段劃分成很多短小的時間片,每個時間片只讓處理器執行一個進程(Process)——儘管同時可能有多個進程需要處理。在第一個時間片裡,操作系統讓處理器處理 A 進程;時間片的時間用完之後,無論 A 進程處理到什麼程度,都要被“掛起”(即,A 進程這時不能再佔用處理器資源——儘管它還是被允許使用計算機的其他資源,如內存、磁盤、屏幕輸出等);在第二個時間片裡,處理器處理的是 B 進程,時間用完之後,B 進程將與 A 進程一樣被中途“掛起”;
優秀的領導,能夠把人們帶到他們想去的地方;而卓越的領導,能夠把人們帶到他們應該去但是沒想過要去的地方 A leader takes people where they want to go. A great leader takes people where they don’t necessarily want to go,but ought to be.
A program database (.pdb) file, also called a symbol file, maps the identifiers that you create in source files for classes, methods, and other code to the identifiers that are used in the compiled executables of your project.
PDB 記什麼
原始碼的檔案名稱 (source code file name)
變數與行號 (lines and the local variable names.)
偵錯工具搜尋 .pdb 檔案的順序?
DLL 或可執行檔內部指定的位置
可能和 DLL 或可執行檔存在相同資料夾中的 .pdb 檔案。
任何本機符號快取資料夾。
任何在像是 Microsoft 符號伺服器 (如果啟用) 等位置指定的網路、網際網路或本機符號伺服器和位置。
line 46 at [00001F16][0001:00001F16], len = 0x1 D:\Repo\Mark_Lin\PROJ\WebAPI\Controllers\BookController.cs line 47 at [00001F17][0001:00001F17], len = 0x6 line 48 at [00001F1D][0001:00001F1D], len = 0x1C