This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package com.book; | |
message Book { | |
int64 isbn = 1; | |
string title = 2; | |
string author = 3; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
type: bool default: false | |
--expose_gc (expose gc extension) | |
type: bool default: false | |
--max_new_space_size (max size of the new generation (in kBytes)) | |
type: int default: 0 | |
--max_old_space_size (max size of the old generation (in Mbytes)) | |
type: int default: 0 | |
--max_executable_size (max size of executable memory (in Mbytes)) | |
type: int default: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ node -v | |
v8.4.0 | |
$ node --v8-options | grep gc | |
--gc_global (always perform global GCs) | |
--gc_interval (garbage collect after <n> allocations) | |
--retain_maps_for_n_gc (keeps maps alive for <n> old space garbage collections) | |
--trace_gc (print one trace line following each garbage collection) | |
--trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection) | |
--trace_gc_ignore_scavenger (do not print trace line after scavenger collection) | |
--trace_gc_verbose (print more details following each garbage collection) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"net/http" | |
_ "net/http/pprof" | |
"runtime" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"math/rand" | |
"net/http" | |
_ "net/http/pprof" | |
"os" | |
"runtime" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
"use strict"; | |
const interval = 1000; // 采样间隔,即在这个间隔的自然时间内,调用lag()得到的结果将只会得到同样的返回 | |
const lag = require('event-loop-lag')(interval); | |
function consume() { | |
function fabonacci(n) { | |
if (n === 0) { | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Entity, Column, PrimaryGeneratedColumn, Index, BaseEntity } from 'typeorm'; | |
@Entity('test_entity') | |
@Index('test_entity_index', ['columnB', 'columnC'], { unique: true }) | |
export class TestEntity extends BaseEntity { | |
@PrimaryGeneratedColumn({ type: 'int', name: 'id' }) | |
id: number; | |
@Column({ type: 'int', name: 'column_b' }) | |
columnB: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Statistical profiling result from isolate-0x103000000-v8.log, (20819 ticks, 582 unaccounted, 0 excluded). | |
[Shared libraries]: | |
ticks total nonlib name | |
38 0.2% /usr/lib/system/libsystem_malloc.dylib | |
22 0.1% /usr/lib/system/libsystem_kernel.dylib | |
9 0.0% /usr/lib/system/libsystem_platform.dylib | |
4 0.0% /usr/lib/system/libsystem_c.dylib | |
1 0.0% /usr/lib/system/libsystem_pthread.dylib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "profile", | |
"version": "0.0.1", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "MIT", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "book/book.proto", | |
"version": "version not set" | |
}, | |
"schemes": [ | |
"http", | |
"https" | |
], |
NewerOlder